1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-17 02:05:21 +03:00

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)
This commit is contained in:
Andrew Bartlett 2002-08-31 06:38:27 +00:00
parent 724d1c3d2d
commit 40e9d9a54e

View File

@ -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;
}