From 4c908afd76a0b141e79c9cfe2ef08a0d49915554 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 5 May 2004 02:58:43 +0000 Subject: [PATCH] r486: BUG 1309: fix seg fault caused by trying to strdup() a NULL pointer --- source/smbd/password.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/smbd/password.c b/source/smbd/password.c index d15970cbefe..72292de4227 100644 --- a/source/smbd/password.c +++ b/source/smbd/password.c @@ -488,7 +488,11 @@ BOOL authorise_login(int snum, fstring user, DATA_BLOB password, /* now check the list of session users */ if (!ok) { char *auser; - char *user_list = strdup(session_userlist); + char *user_list = NULL; + + if ( session_userlist ) + user_list = strdup(session_userlist); + if (!user_list) return(False); -- 2.11.4.GIT