git.samba.org
/
kai
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8dafa45
)
r14115: Fix coverity bug #23. Don't deref a potentially null ptr.
author
Jeremy Allison
<jra@samba.org>
Thu, 9 Mar 2006 22:46:42 +0000
(22:46 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 16:11:13 +0000
(11:11 -0500)
Jeremy.
source/rpc_parse/parse_samr.c
patch
|
blob
|
history
diff --git
a/source/rpc_parse/parse_samr.c
b/source/rpc_parse/parse_samr.c
index 043bafe28530f2f8cd37228f5977bd716386d3dd..2f8fe74ed3a3ef2a97aa84e092066886b9108c10 100644
(file)
--- a/
source/rpc_parse/parse_samr.c
+++ b/
source/rpc_parse/parse_samr.c
@@
-5541,7
+5541,11
@@
void init_sam_user_info23W(SAM_USER_INFO_23 * usr, NTTIME * logon_time, /* all z
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);
+ }
}
/*************************************************************************