s3:smb2cli: SMB2_READ needs one dyn byte to that the structure size check works.
authorStefan Metzmacher <metze@samba.org>
Mon, 5 Sep 2011 16:22:57 +0000 (18:22 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 7 Sep 2011 06:32:45 +0000 (08:32 +0200)
Windows generates NT_STATUS_INVALID_PARAMETER otherwise.

metze

source3/libsmb/smb2cli_read.c

index bcdbd87e6a4b20a661efa258256796919862209e..e45a75f6cadd8a6369a1800709b29beecc329314 100644 (file)
@@ -27,6 +27,7 @@
 
 struct smb2cli_read_state {
        uint8_t fixed[48];
+       uint8_t dyn_pad[1];
        struct iovec *recv_iov;
        uint8_t *data;
        uint32_t data_length;
@@ -70,7 +71,7 @@ struct tevent_req *smb2cli_read_send(TALLOC_CTX *mem_ctx,
                                  cli->smb2.tid,
                                  cli->smb2.uid,
                                  state->fixed, sizeof(state->fixed),
-                                 NULL, 0);
+                                 state->dyn_pad, sizeof(state->dyn_pad));
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
        }