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,11 +361,13 @@ int smb_addfile_withlist(smb_t* smb, smbfile_t* file, int storage, const char* e ...@@ -361,11 +361,13 @@ int smb_addfile_withlist(smb_t* smb, smbfile_t* file, int storage, const char* e
if(list != NULL && *list != NULL) { if(list != NULL && *list != NULL) {
size_t size = strListCount(list) * 1024; size_t size = strListCount(list) * 1024;
if(size > 0) {
auxdata = calloc(1, size); auxdata = calloc(1, size);
if(auxdata == NULL) if(auxdata == NULL)
return SMB_ERR_MEM; return SMB_ERR_MEM;
strListCombine(list, auxdata, size - 1, "\r\n"); strListCombine(list, auxdata, size - 1, "\r\n");
} }
}
result = smb_addfile(smb, file, storage, extdesc, auxdata, path); result = smb_addfile(smb, file, storage, extdesc, auxdata, path);
free(auxdata); free(auxdata);
return result; return result;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment