svn commit: samba r14092 - in branches/SAMBA_3_0/source/rpc_parse: .

jra at samba.org jra at samba.org
Thu Mar 9 19:51:38 GMT 2006


Author: jra
Date: 2006-03-09 19:51:38 +0000 (Thu, 09 Mar 2006)
New Revision: 14092

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14092

Log:
Fix coverity bug #22. Ensure no possible null
deref.
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 19:14:01 UTC (rev 14091)
+++ branches/SAMBA_3_0/source/rpc_parse/parse_samr.c	2006-03-09 19:51:38 UTC (rev 14092)
@@ -5633,7 +5633,11 @@
 
 	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);
+	}
 }
 
 /*******************************************************************



More information about the samba-cvs mailing list