svn commit: samba r14115 - in branches/SAMBA_3_0/source/rpc_parse: .
jra at samba.org
jra at samba.org
Thu Mar 9 22:46:42 GMT 2006
Author: jra
Date: 2006-03-09 22:46:42 +0000 (Thu, 09 Mar 2006)
New Revision: 14115
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14115
Log:
Fix coverity bug #23. Don't deref a potentially null ptr.
Jeremy.
Modified:
branches/SAMBA_3_0/source/rpc_parse/parse_samr.c
Changeset:
Modified: branches/SAMBA_3_0/source/rpc_parse/parse_samr.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_parse/parse_samr.c 2006-03-09 22:40:47 UTC (rev 14114)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_samr.c 2006-03-09 22:46:42 UTC (rev 14115)
@@ -5541,7 +5541,11 @@
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);
+ }
}
/*************************************************************************
More information about the samba-cvs
mailing list