FSCTL_GET_SHADOW_COPY_DATA: Initialize output array to zero
authorChristof Schmitt <christof.schmitt@us.ibm.com>
Mon, 5 Aug 2013 18:16:22 +0000 (11:16 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 6 Aug 2013 00:10:56 +0000 (17:10 -0700)
Otherwise num_volumes and the end marker can return uninitialized data
to the client.

Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
source3/modules/vfs_default.c

index 82d059c28fae90afe03c6b0e84ebfcf438bb511e..efb020425c8ef20a45d973454b865945a7c37687 100644 (file)
@@ -1151,7 +1151,7 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct *handle,
                        return NT_STATUS_BUFFER_TOO_SMALL;
                }
 
-               cur_pdata = talloc_array(ctx, char, *out_len);
+               cur_pdata = talloc_zero_array(ctx, char, *out_len);
                if (cur_pdata == NULL) {
                        TALLOC_FREE(shadow_data);
                        return NT_STATUS_NO_MEMORY;