mirror of
https://github.com/samba-team/samba.git
synced 2025-01-29 21:47:30 +03:00
s3:smb2cli: SMB2_CREATE needs one dyn byte to that the structure size check works.
Windows generates NT_STATUS_INVALID_PARAMETER otherwise. metze
This commit is contained in:
parent
35d4afc3e0
commit
b57fb1e1a4
@ -112,7 +112,7 @@ struct tevent_req *smb2cli_create_send(
|
|||||||
SIVAL(fixed, 48, blobs_offset + SMB2_HDR_BODY + 56);
|
SIVAL(fixed, 48, blobs_offset + SMB2_HDR_BODY + 56);
|
||||||
SIVAL(fixed, 52, blob.length);
|
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);
|
dyn = talloc_zero_array(state, uint8_t, dyn_len);
|
||||||
if (tevent_req_nomem(dyn, req)) {
|
if (tevent_req_nomem(dyn, req)) {
|
||||||
return tevent_req_post(req, ev);
|
return tevent_req_post(req, ev);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user