if ( (length > 0) && (!IsEmptyStr(cbtype)) ) {
WCC->upload = NewStrBufPlain(content, length);
WCC->upload_length = length;
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));
safestrncpy(WCC->upload_content_type, cbtype,
sizeof(WC->upload_content_type));