1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-12 19:22:41 +00:00

dtmail: Resolve format-overflow issues

This commit is contained in:
Peter Howkins 2021-12-23 19:51:24 +00:00 committed by Jon Trulson
parent 16c3ed3650
commit 238385530d
3 changed files with 3 additions and 3 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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);