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

Detect smb_[f]allocdat() failure in editmsg()

CID 319091
parent d73bf3b1
No related branches found
No related tags found
No related merge requests found
......@@ -1681,6 +1681,12 @@ bool sbbs_t::editmsg(smb_t* smb, smbmsg_t *msg)
smb_close_da(smb);
}
if(offset < 0) {
smb_unlocksmbhdr(smb);
errormsg(WHERE,ERR_ALLOC,msgtmp,length);
return false;
}
msg->hdr.offset=(uint32_t)offset;
if((file=open(msgtmp,O_RDONLY|O_BINARY))==-1
|| (instream=fdopen(file,"rb"))==NULL) {
......
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