X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fparamhandling.c;h=e257e4517e61aecc38fc7efe21d6a45dae93cc8a;hb=dcae8966f0bb1443dc3c843462c38e07d79a018d;hp=912fdc5febe61328aaebee8cf66647f0b13f2ddf;hpb=89ecfe7ba123b7677a6a7e494a1d12948663ff72;p=citadel.git diff --git a/webcit/paramhandling.c b/webcit/paramhandling.c index 912fdc5fe..e257e4517 100644 --- a/webcit/paramhandling.c +++ b/webcit/paramhandling.c @@ -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); }