From: Wilfried Goesgens Date: Thu, 3 Dec 2015 18:36:07 +0000 (+0100) Subject: By John Goerzen: fix buffer overrun in the text client when sending files with mimet... X-Git-Tag: Release_902~123 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=85306faf2231501cf896f4227bc6cb30daa6e849 By John Goerzen: fix buffer overrun in the text client when sending files with mimetypes. --- diff --git a/textclient/src/citadel_ipc.c b/textclient/src/citadel_ipc.c index c7e61bc49..907100db3 100644 --- a/textclient/src/citadel_ipc.c +++ b/textclient/src/citadel_ipc.c @@ -1520,7 +1520,7 @@ int CtdlIPCFileUpload(CtdlIPC *ipc, const char *save_as, const char *comment, return -3; MimeType = GuessMimeType(&MimeTestBuf[0], len); - aaa = (char *)malloc(strlen(save_as) + strlen(comment) + 7); + aaa = (char *)malloc(strlen(save_as) + strlen(MimeType) + strlen(comment) + 7); if (!aaa) return -1; sprintf(aaa, "UOPN %s|%s|%s", save_as, MimeType, comment);