diff options
author | Jeremy Allison <jra@samba.org> | 2006-03-09 19:13:55 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:11:11 -0500 |
commit | d12fd8dcb71a85d0ecd38dd6c17d213cefcdf1c0 (patch) | |
tree | 91cd166c1c89d4fa4ed84befa4347d53dbc41551 | |
parent | e096440b746219cfcba20a881d64180d08045eef (diff) | |
download | samba-d12fd8dcb71a85d0ecd38dd6c17d213cefcdf1c0.tar.gz samba-d12fd8dcb71a85d0ecd38dd6c17d213cefcdf1c0.tar.bz2 samba-d12fd8dcb71a85d0ecd38dd6c17d213cefcdf1c0.zip |
r14090: Fix coverity bug #21, don't deref potential null.
Jeremy.
(This used to be commit 76c4d5212bcb5f54472c9ceac2368078ebad7a3b)
-rw-r--r-- | source3/rpc_parse/parse_samr.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index 3147ae0028..79dbcfe034 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -5972,7 +5972,11 @@ void init_sam_user_info21W(SAM_USER_INFO_21 * usr, copy_unistr2(&usr->uni_munged_dial, mung_dial); init_uni_hdr(&usr->hdr_munged_dial, &usr->uni_munged_dial); - memcpy(&usr->logon_hrs, hrs, sizeof(usr->logon_hrs)); + if (hrs) { + memcpy(&usr->logon_hrs, hrs, sizeof(usr->logon_hrs)); + } else { + ZERO_STRUCT(usr->logon_hrs); + } } /************************************************************************* |