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

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

parent 7a8b54b9
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #1858 passed
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment