s3:libsmb: consistently use state->size in cli_write_andx_create() (bug #5326)
authorStefan Metzmacher <metze@samba.org>
Wed, 9 Nov 2011 07:09:17 +0000 (08:09 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 9 Nov 2011 09:13:32 +0000 (10:13 +0100)
Otherwise we may get unexpected results.

This is a fix that was missing in commit 95595dd93fd04999fcf56ecaab7c29b064d021f8
(s3:libsmb: fix cli_write_and_x() against OS/2 print shares (bug #5326))

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Nov  9 10:13:32 CET 2011 on sn-devel-104

source3/libsmb/clireadwrite.c

index 79624ecbef56e2b31efd3e3dc622acc87945b727..2a39edfbe276c255249bb6d71c5c310eddaf1548 100644 (file)
@@ -880,7 +880,7 @@ struct tevent_req *cli_write_andx_create(TALLOC_CTX *mem_ctx,
        state->iov[0].iov_base = (void *)&state->pad;
        state->iov[0].iov_len = 1;
        state->iov[1].iov_base = discard_const_p(void, buf);
-       state->iov[1].iov_len = size;
+       state->iov[1].iov_len = state->size;
 
        subreq = cli_smb_req_create(state, ev, cli, SMBwriteX, 0, wct, vwv,
                                    2, state->iov);