Fix for bug 7501 - SMB2: CREATE request replies getting mangled.
authorIra Cooper <samba@ira.wakeful.net>
Tue, 8 Jun 2010 18:20:23 +0000 (11:20 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 8 Jun 2010 18:20:23 +0000 (11:20 -0700)
Code for dup_smb2_req() was duplicating the wrong vector (i, instead
of i+2) when returning a non-minimal SMB2 response.

source3/smbd/smb2_server.c

index df2557080bc3327569699621cd7ed9659ee9bd43..009cc77e9f2e743823f4fe88745d430b2a8204dc 100644 (file)
@@ -551,9 +551,7 @@ static struct smbd_smb2_request *dup_smb2_req(const struct smbd_smb2_request *re
                        outvec[i+2].iov_base = ((uint8_t *)outvec[i].iov_base) +
                                (OUTVEC_ALLOC_SIZE - 1);
                        outvec[i+2].iov_len = 1;
-               } else if (!dup_smb2_vec(outvec,
-                               req->out.vector,
-                               i)) {
+               } else if (!dup_smb2_vec(outvec, req->out.vector, i+2)) {
                        break;
                }
        }