Commit c2d6c7c2 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Detect/reject negative offset argument values to smb_freemsgdat()

parent b47b97c2
...@@ -129,6 +129,9 @@ int smb_freemsgdat(smb_t* smb, off_t offset, ulong length, uint16_t refs) ...@@ -129,6 +129,9 @@ int smb_freemsgdat(smb_t* smb, off_t offset, ulong length, uint16_t refs)
off_t sda_offset; off_t sda_offset;
off_t flen; off_t flen;
if(offset < 0)
return SMB_ERR_DAT_OFFSET;
if(smb->status.attr&SMB_HYPERALLOC) /* do nothing */ if(smb->status.attr&SMB_HYPERALLOC) /* do nothing */
return(SMB_SUCCESS); return(SMB_SUCCESS);
......
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