diff options
author | Gerald Carter <jerry@samba.org> | 2004-05-05 02:58:43 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:51:25 -0500 |
commit | c2c069d4b0fc6e29194a8ba8d12b8aba59dae4c2 (patch) | |
tree | 7ba4a8ccbf485b920abe21a60342f65191b8b2ae | |
parent | 7671f29d7146c75d57c4269867164a4ae9c8369c (diff) | |
download | samba-c2c069d4b0fc6e29194a8ba8d12b8aba59dae4c2.tar.gz samba-c2c069d4b0fc6e29194a8ba8d12b8aba59dae4c2.tar.xz samba-c2c069d4b0fc6e29194a8ba8d12b8aba59dae4c2.zip |
r486: BUG 1309: fix seg fault caused by trying to strdup() a NULL pointer
(This used to be commit 0e1a6b34f2690da32bf568330575651988d0c965)
-rw-r--r-- | source3/smbd/password.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c index d15970cbefe..72292de4227 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); |