torture: Fix copy and paste error.
authorAndreas Schneider <asn@samba.org>
Fri, 30 Nov 2012 09:57:39 +0000 (10:57 +0100)
committerDavid Disseldorp <ddiss@samba.org>
Mon, 15 Apr 2013 16:15:12 +0000 (18:15 +0200)
Found by Coverity.

(cherry picked from commit 1b170c29bc9239e2077e70c929e7426f5b19104d)

source4/torture/smb2/ioctl.c

index ad300c028def45f1baf9d7d60283ebe4ea7cf8ab..5897162c37cc44553900fa24293569e8f91aeb3f 100644 (file)
@@ -182,7 +182,7 @@ static bool test_setup_copy_chunk(struct torture_context *torture,
        torture_assert_ntstatus_ok(torture, status, "create write");
 
        if (dest_size > 0) {
-               for (i = 0; i <= src_size - 8; i += 8) {
+               for (i = 0; i <= dest_size - 8; i += 8) {
                        SBVAL(buf, i, patt_hash(i));
                }
                status = smb2_util_write(tree, *dest_h, buf, 0, dest_size);