svn commit: samba r17862 - in branches: SAMBA_3_0/source/lib SAMBA_3_0_23/source/lib

jra at samba.org jra at samba.org
Mon Aug 28 01:48:06 GMT 2006


Author: jra
Date: 2006-08-28 01:48:04 +0000 (Mon, 28 Aug 2006)
New Revision: 17862

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

Log:
Fix possible NULL deref (like rev 17861) found by the
Stanford group.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/lib/util_str.c
   branches/SAMBA_3_0_23/source/lib/util_str.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/util_str.c
===================================================================
--- branches/SAMBA_3_0/source/lib/util_str.c	2006-08-28 01:44:40 UTC (rev 17861)
+++ branches/SAMBA_3_0/source/lib/util_str.c	2006-08-28 01:48:04 UTC (rev 17862)
@@ -2284,7 +2284,9 @@
 	const char *p = nptr;
 	
 	if (!p) {
-		*entptr = p;
+		if (entptr) {
+			*entptr = p;
+		}
 		return val;
 	}
 

Modified: branches/SAMBA_3_0_23/source/lib/util_str.c
===================================================================
--- branches/SAMBA_3_0_23/source/lib/util_str.c	2006-08-28 01:44:40 UTC (rev 17861)
+++ branches/SAMBA_3_0_23/source/lib/util_str.c	2006-08-28 01:48:04 UTC (rev 17862)
@@ -2251,7 +2251,9 @@
 	const char *p = nptr;
 	
 	if (!p) {
-		*entptr = p;
+		if (entptr) {
+			*entptr = p;
+		}
 		return val;
 	}
 



More information about the samba-cvs mailing list