Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 9171893e authored by Rob Swindell's avatar Rob Swindell 💬

Fix heap corruption (under malloc) - crashed on Linux-x64

parent 7a8b54b9
Pipeline #1858 passed with stage
in 7 minutes and 51 seconds
......@@ -149,7 +149,7 @@ int main(int argc,char **argv)
smb_close(&smb);
continue;
}
if((fcrc[i] = malloc(smb.status.total_files * sizeof(uint32_t)))==NULL) {
if((fcrc[i] = malloc((smb.status.total_files + 1) * sizeof(uint32_t)))==NULL) {
printf("Not enough memory for CRCs.\r\n");
return(1);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment