summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-09-05 18:22:57 +0200
committerStefan Metzmacher <metze@samba.org>2011-09-07 08:32:08 +0200
commitb57fb1e1a4ec286940f1d165f360af62278e5a8f (patch)
treea5139b5a7422231668b11cc5b618852a66604fb5 /source3/libsmb
parent35d4afc3e0a364328e5fd1e3789ec18705c2c482 (diff)
downloadsamba-b57fb1e1a4ec286940f1d165f360af62278e5a8f.tar.gz
samba-b57fb1e1a4ec286940f1d165f360af62278e5a8f.tar.bz2
samba-b57fb1e1a4ec286940f1d165f360af62278e5a8f.zip
s3:smb2cli: SMB2_CREATE needs one dyn byte to that the structure size check works.
Windows generates NT_STATUS_INVALID_PARAMETER otherwise. metze
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/smb2cli_create.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/libsmb/smb2cli_create.c b/source3/libsmb/smb2cli_create.c
index ecb220d4ac..50c9816ded 100644
--- a/source3/libsmb/smb2cli_create.c
+++ b/source3/libsmb/smb2cli_create.c
@@ -112,7 +112,7 @@ struct tevent_req *smb2cli_create_send(
SIVAL(fixed, 48, blobs_offset + SMB2_HDR_BODY + 56);
SIVAL(fixed, 52, blob.length);
- dyn_len = blobs_offset + blob.length;
+ dyn_len = MAX(1, blobs_offset + blob.length);
dyn = talloc_zero_array(state, uint8_t, dyn_len);
if (tevent_req_nomem(dyn, req)) {
return tevent_req_post(req, ev);