* upsie. that conversion to strbuf was still hanging around, heres the rest of it.
[citadel.git] / webcit / paramhandling.c
index 912fdc5febe61328aaebee8cf66647f0b13f2ddf..e257e4517e61aecc38fc7efe21d6a45dae93cc8a 100644 (file)
@@ -320,8 +320,7 @@ void upload_handler(char *name, char *filename, char *partnum, char *disp,
        if ( (length > 0) && (!IsEmptyStr(cbtype)) ) {
                WCC->upload = NewStrBufPlain(content, length);
                WCC->upload_length = length;
-               safestrncpy(WCC->upload_filename, filename,
-                           sizeof(WC->upload_filename));
+               WCC->upload_filename = NewStrBufPlain(filename, -1);
                safestrncpy(WCC->upload_content_type, cbtype,
                            sizeof(WC->upload_content_type));
                
@@ -441,4 +440,5 @@ SessionDetachModule_PARAMHANDLING
 (wcsession *sess)
 {
        DeleteHash(&sess->Hdr->urlstrings);
+       FreeStrBuf(&sess->upload_filename);
 }