Skip to content
Snippets Groups Projects
Commit 4f77a202 authored by rswindell's avatar rswindell
Browse files

smb_addcrc() - only malloc for as many CRCs as there are (not the max).

parent 2765757f
No related branches found
No related tags found
No related merge requests found
...@@ -1250,7 +1250,7 @@ int SMBCALL smb_addcrc(smb_t* smb, ulong crc) ...@@ -1250,7 +1250,7 @@ int SMBCALL smb_addcrc(smb_t* smb, ulong crc)
sprintf(smb->last_error,"invalid file length: %ld", length); sprintf(smb->last_error,"invalid file length: %ld", length);
return(SMB_ERR_FILE_LEN); return(SMB_ERR_FILE_LEN);
} }
if((buf=(ulong*)MALLOC(smb->status.max_crcs*4))==NULL) { if((buf=(ulong*)MALLOC(length))==NULL) {
close(file); close(file);
sprintf(smb->last_error sprintf(smb->last_error
,"malloc failure of %ld bytes" ,"malloc failure of %ld bytes"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment