summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-09-28 14:12:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:39:07 -0500
commit5a1cf98998fb81c8b7bdab28d36cea04f7c22edc (patch)
tree8d34705cf5cb364fa2865bd80c30eca1ae569418
parent40a6f8f2b206963aae6096408c95c783d1298eca (diff)
downloadsamba-5a1cf98998fb81c8b7bdab28d36cea04f7c22edc.tar.gz
samba-5a1cf98998fb81c8b7bdab28d36cea04f7c22edc.tar.bz2
samba-5a1cf98998fb81c8b7bdab28d36cea04f7c22edc.zip
r10579: str_list_make() can return NULL
(This used to be commit f547ab4644fd1c8ae2e44a25e874abf35e02d986)
-rw-r--r--source4/auth/auth_sam.c2
-rw-r--r--source4/lib/util_sock.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/source4/auth/auth_sam.c b/source4/auth/auth_sam.c
index a6db8ef63d..1df2103eb6 100644
--- a/source4/auth/auth_sam.c
+++ b/source4/auth/auth_sam.c
@@ -163,7 +163,7 @@ static NTSTATUS authsam_account_ok(TALLOC_CTX *mem_ctx,
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));
diff --git a/source4/lib/util_sock.c b/source4/lib/util_sock.c
index be968666a7..8a65a27d02 100644
--- a/source4/lib/util_sock.c
+++ b/source4/lib/util_sock.c
@@ -75,6 +75,9 @@ void set_socket_options(int fd, const char *options)
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;