Skip to content
Snippets Groups Projects
Commit 46c0eb0d authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix CID 471656 in smb_addfile_withlist()

No one's using this function currently (and may never).

It was used back when I was putting archive contents in .ini format in the
files' metadata (now auxdata).
parent 131b10b6
No related branches found
No related tags found
No related merge requests found
......@@ -361,10 +361,12 @@ int smb_addfile_withlist(smb_t* smb, smbfile_t* file, int storage, const char* e
if(list != NULL && *list != NULL) {
size_t size = strListCount(list) * 1024;
auxdata = calloc(1, size);
if(auxdata == NULL)
return SMB_ERR_MEM;
strListCombine(list, auxdata, size - 1, "\r\n");
if(size > 0) {
auxdata = calloc(1, size);
if(auxdata == NULL)
return SMB_ERR_MEM;
strListCombine(list, auxdata, size - 1, "\r\n");
}
}
result = smb_addfile(smb, file, storage, extdesc, auxdata, path);
free(auxdata);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment