From 85306faf2231501cf896f4227bc6cb30daa6e849 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Thu, 3 Dec 2015 19:36:07 +0100 Subject: [PATCH] By John Goerzen: fix buffer overrun in the text client when sending files with mimetypes. --- textclient/src/citadel_ipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2