diff --git a/cde/programs/dtmail/include/DtMail/DtMailServer.hh b/cde/programs/dtmail/include/DtMail/DtMailServer.hh index f3c56cf95..c4c7a0be2 100644 --- a/cde/programs/dtmail/include/DtMail/DtMailServer.hh +++ b/cde/programs/dtmail/include/DtMail/DtMailServer.hh @@ -194,7 +194,7 @@ protected: char *_shroud; // String to shroud in debug output. char _transtag[DTMAS_TAGSIZE]; // Tag of the current transaction. - int _transnum; // Number of the current transaction. + unsigned _transnum; // Number of the current transaction. int _timeout; // Timeout seconds waiting for server. char *_username; diff --git a/cde/programs/dtmail/libDtMail/Common/DtMailServer.C b/cde/programs/dtmail/libDtMail/Common/DtMailServer.C index 861d06afd..973c96bdf 100644 --- a/cde/programs/dtmail/libDtMail/Common/DtMailServer.C +++ b/cde/programs/dtmail/libDtMail/Common/DtMailServer.C @@ -67,7 +67,7 @@ #endif #define dtmasTAGCLR() *_transtag = '\0'; _transnum=0; -#define dtmasTAGGEN() (sprintf(_transtag, "a%04d", ++_transnum), _transtag) +#define dtmasTAGGEN() (sprintf(_transtag, "a%04u", ++_transnum), _transtag) #define dtmasTAGGET() (_transtag) static jmp_buf restart; diff --git a/cde/programs/dtmail/libDtMail/RFC/RFCMIME.C b/cde/programs/dtmail/libDtMail/RFC/RFCMIME.C index f31196fb3..44e8c68ea 100644 --- a/cde/programs/dtmail/libDtMail/RFC/RFCMIME.C +++ b/cde/programs/dtmail/libDtMail/RFC/RFCMIME.C @@ -1398,7 +1398,7 @@ RFCMIME::formatBodies(DtMailEnv & error, free(bp_contents); } else { - char *content_type = new char[100]; + char *content_type = new char[100 + sizeof(boundary)]; sprintf(content_type, "Content-Type: multipart/mixed;boundary=%s", boundary);