diff options
author | Jeremy Allison <jra@samba.org> | 2006-03-09 19:51:38 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:11:11 -0500 |
commit | aa3cab954e1d33bb8e5a5891e2b4f8024cfe5b70 (patch) | |
tree | ac0ec916ec59c64dd88f0ccc4ddb2c81513a1ed3 | |
parent | d12fd8dcb71a85d0ecd38dd6c17d213cefcdf1c0 (diff) | |
download | samba-aa3cab954e1d33bb8e5a5891e2b4f8024cfe5b70.tar.gz samba-aa3cab954e1d33bb8e5a5891e2b4f8024cfe5b70.tar.bz2 samba-aa3cab954e1d33bb8e5a5891e2b4f8024cfe5b70.zip |
r14092: Fix coverity bug #22. Ensure no possible null
deref.
Jeremy.
(This used to be commit 0026fb0b2843271c27e9dc02a32e88d580bebbc3)
-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 79dbcfe034..043bafe285 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -5633,7 +5633,11 @@ void init_sam_user_info23A(SAM_USER_INFO_23 * usr, NTTIME * logon_time, /* all z data_blob_free(&blob); - 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); + } } /******************************************************************* |