By John Goerzen: fix buffer overrun in the text client when sending files with mimet...
[citadel.git] / textclient / src / citadel_ipc.c
index 8a65f85d92c92d92f0d9006c24f3cef0dba69789..907100db38947053ee01fe1946655a8a33f3017c 100644 (file)
@@ -87,8 +87,8 @@ char *axdefs[]={
         "Local User",
         "Network User",
         "Preferred User",
-        "Aide",
-        "Sysop"
+        "Admin",
+        "Admin"
         };
 
 
@@ -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);