FSCTL_GET_SHADOW_COPY_DATA: Don't return 4 extra bytes at end
authorChristof Schmitt <christof.schmitt@us.ibm.com>
Mon, 5 Aug 2013 18:21:59 +0000 (11:21 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 6 Aug 2013 02:03:17 +0000 (04:03 +0200)
labels_data_count already accounts for the unicode null character at the
end of the array. There is no need in adding space for it again.

Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug  6 04:03:17 CEST 2013 on sn-devel-104

source3/modules/vfs_default.c

index efb020425c8ef20a45d973454b865945a7c37687..304ef372f3a299b1e46d8a260b58fc3dd6272024 100644 (file)
@@ -1141,7 +1141,7 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct *handle,
                if (!labels) {
                        *out_len = 16;
                } else {
-                       *out_len = 12 + labels_data_count + 4;
+                       *out_len = 12 + labels_data_count;
                }
 
                if (max_out_len < *out_len) {
@@ -1168,7 +1168,7 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct *handle,
                }
 
                /* needed_data_count 4 bytes */
-               SIVAL(cur_pdata, 8, labels_data_count + 4);
+               SIVAL(cur_pdata, 8, labels_data_count);
 
                cur_pdata += 12;