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

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

CID 319091
parent 41ce191d
......@@ -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) {
......
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