dtmail: Resolve format-overflow issues
This commit is contained in:
committed by
Jon Trulson
parent
16c3ed3650
commit
238385530d
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user