Skip to content
Snippets Groups Projects
Commit 813c0548 authored by rswindell's avatar rswindell
Browse files

smb_addmsghdr() will now initialize the hdr.version field if it's uninitialized

parent 5cdbfdc0
No related branches found
No related tags found
No related merge requests found
......@@ -237,7 +237,6 @@ int SMBCALL smb_addmsg(smb_t* smb, smbmsg_t* msg, int storage, long dupechk_hash
fflush(smb->sdt_fp);
}
msg->hdr.version=smb_ver();
if(msg->hdr.when_imported.time==0) {
msg->hdr.when_imported.time=time(NULL);
msg->hdr.when_imported.zone=0; /* how do we detect system TZ? */
......
......@@ -1403,6 +1403,8 @@ int SMBCALL smb_addmsghdr(smb_t* smb, smbmsg_t* msg, int storage)
return(i);
}
if(msg->hdr.version==0)
msg->hdr.version=SMB_VERSION;
msg->hdr.length=(ushort)hdrlen;
if(storage==SMB_HYPERALLOC)
l=smb_hallochdr(smb);
......
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