summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-05-05 02:58:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:25 -0500
commitc2c069d4b0fc6e29194a8ba8d12b8aba59dae4c2 (patch)
tree7ba4a8ccbf485b920abe21a60342f65191b8b2ae /source3/smbd
parent7671f29d7146c75d57c4269867164a4ae9c8369c (diff)
downloadsamba-c2c069d4b0fc6e29194a8ba8d12b8aba59dae4c2.tar.gz
samba-c2c069d4b0fc6e29194a8ba8d12b8aba59dae4c2.tar.bz2
samba-c2c069d4b0fc6e29194a8ba8d12b8aba59dae4c2.zip
r486: BUG 1309: fix seg fault caused by trying to strdup() a NULL pointer
(This used to be commit 0e1a6b34f2690da32bf568330575651988d0c965)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/password.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index d15970cbef..72292de422 100644
--- a/source3/smbd/password.c
+++ b/source3/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);