From 4f77a20239968a8f8289bae7f446014c8654aadc Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Thu, 22 May 2003 19:50:21 +0000 Subject: [PATCH] smb_addcrc() - only malloc for as many CRCs as there are (not the max). --- src/smblib/smblib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/smblib/smblib.c b/src/smblib/smblib.c index 4c90a46708..508fd8ede6 100644 --- a/src/smblib/smblib.c +++ b/src/smblib/smblib.c @@ -1250,7 +1250,7 @@ int SMBCALL smb_addcrc(smb_t* smb, ulong crc) sprintf(smb->last_error,"invalid file length: %ld", length); return(SMB_ERR_FILE_LEN); } - if((buf=(ulong*)MALLOC(smb->status.max_crcs*4))==NULL) { + if((buf=(ulong*)MALLOC(length))==NULL) { close(file); sprintf(smb->last_error ,"malloc failure of %ld bytes" -- GitLab