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)
committerKarolin Seeger <kseeger@samba.org>
Mon, 19 May 2014 10:28:07 +0000 (12:28 +0200)
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>
(cherry picked from commit 30e724cbff1ecd90e5a676831902d1e41ec1b347)

source3/modules/vfs_default.c

index 75dd5acc7795a7d84e27558cf72d44b83b0937eb..99380ab46b165769d45266fa5f47eb935d6d3afb 100644 (file)
@@ -1135,7 +1135,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;