svn commit: samba r10579 - in branches/SAMBA_4_0/source: auth lib

jelmer at samba.org jelmer at samba.org
Wed Sep 28 14:12:10 GMT 2005


Author: jelmer
Date: 2005-09-28 14:12:09 +0000 (Wed, 28 Sep 2005)
New Revision: 10579

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

Log:
str_list_make() can return NULL

Modified:
   branches/SAMBA_4_0/source/auth/auth_sam.c
   branches/SAMBA_4_0/source/lib/util_sock.c


Changeset:
Modified: branches/SAMBA_4_0/source/auth/auth_sam.c
===================================================================
--- branches/SAMBA_4_0/source/auth/auth_sam.c	2005-09-28 14:07:59 UTC (rev 10578)
+++ branches/SAMBA_4_0/source/auth/auth_sam.c	2005-09-28 14:12:09 UTC (rev 10579)
@@ -163,7 +163,7 @@
 		int i;
 		const char **workstations = str_list_make(mem_ctx, workstation_list, ",");
 		
-		for (i = 0; workstations[i]; i++) {
+		for (i = 0; workstations && workstations[i]; i++) {
 			DEBUG(10,("sam_account_ok: checking for workstation match '%s' and '%s'\n",
 				  workstations[i], user_info->workstation_name));
 

Modified: branches/SAMBA_4_0/source/lib/util_sock.c
===================================================================
--- branches/SAMBA_4_0/source/lib/util_sock.c	2005-09-28 14:07:59 UTC (rev 10578)
+++ branches/SAMBA_4_0/source/lib/util_sock.c	2005-09-28 14:12:09 UTC (rev 10579)
@@ -75,6 +75,9 @@
 	const char **options_list = str_list_make(NULL, options, " \t,");
 	int j;
 
+	if (!options_list)
+		return;
+
 	for (j = 0; options_list[j]; j++) {
 		const char *tok = options_list[j];
 		int ret=0,i;



More information about the samba-cvs mailing list