libcli/smb: fix NULL pointer derreference in smbXcli_session_is_authenticated().
authorGünther Deschner <gd@samba.org>
Wed, 20 Apr 2016 18:09:53 +0000 (20:09 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 28 Apr 2016 14:51:16 +0000 (16:51 +0200)
Guenther

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11841

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
libcli/smb/smbXcli_base.c

index 6a717661846d88770e06d53cd92ed418cdba326d..e502dc8bc59fb60ca9f28051fe0dac346a842995 100644 (file)
@@ -5305,6 +5305,10 @@ bool smbXcli_session_is_authenticated(struct smbXcli_session *session)
 {
        const DATA_BLOB *application_key;
 
+       if (session == NULL) {
+               return false;
+       }
+
        if (session->conn == NULL) {
                return false;
        }