]> code.citadel.org Git - citadel.git/blobdiff - webcit/paramhandling.c
* upsie. that conversion to strbuf was still hanging around, heres the rest of it.
[citadel.git] / webcit / paramhandling.c
index 2a9848e36adec1e6e59f6aee8c86f12a3fe9f6a9..e257e4517e61aecc38fc7efe21d6a45dae93cc8a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: paramhandling.c 6808 2008-12-11 00:00:36Z dothebart $
+ * $Id$
  *
  * parse urlparts and post data
  */
@@ -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);
 }