diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-08-31 06:38:27 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-08-31 06:38:27 +0000 |
commit | 40e9d9a54ef65f6e2f54ce3361108e17c0eb8b8f (patch) | |
tree | 9111c989b9ad0dd98c82eb52556fd0a8a8b69ede /source3 | |
parent | 724d1c3d2d04f706c4d0f13c0b59b598bdb10807 (diff) | |
download | samba-40e9d9a54ef65f6e2f54ce3361108e17c0eb8b8f.tar.gz samba-40e9d9a54ef65f6e2f54ce3361108e17c0eb8b8f.tar.bz2 samba-40e9d9a54ef65f6e2f54ce3361108e17c0eb8b8f.zip |
Avoid writing unitialised bytes to the wire (and consequent valgrind warnings)
by zeroing them out if they don't have meaning.
Andrew Bartlett
(This used to be commit 52db44b5c01e16923393b0ec9a8d0f530be7bb2d)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_parse/parse_reg.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c index f3018cfb37..2698e82440 100644 --- a/source3/rpc_parse/parse_reg.c +++ b/source3/rpc_parse/parse_reg.c @@ -1701,7 +1701,11 @@ BOOL reg_io_q_open_entry(char *desc, REG_Q_OPEN_ENTRY *r_q, prs_struct *ps, int void init_reg_r_open_entry(REG_R_OPEN_ENTRY *r_r, POLICY_HND *pol, NTSTATUS status) { - memcpy(&r_r->pol, pol, sizeof(r_r->pol)); + if (NT_STATUS_IS_OK(status)) { + memcpy(&r_r->pol, pol, sizeof(r_r->pol)); + } else { + ZERO_STRUCT(r_r->pol); + } r_r->status = status; } |