s3-libsmb: Fix a possible null pointer dereference.
authorAndreas Schneider <asn@samba.org>
Tue, 18 Dec 2012 15:06:19 +0000 (16:06 +0100)
committerGünther Deschner <gd@samba.org>
Fri, 21 Dec 2012 12:56:01 +0000 (13:56 +0100)
Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
source3/libsmb/libsmb_server.c

index 99aa74c..858622f 100644 (file)
@@ -273,7 +273,7 @@ SMBC_server_internal(TALLOC_CTX *ctx,
          * server...
          */
         if (srv &&
-            *share != '\0' &&
+           share != NULL && *share != '\0' &&
             smbc_getOptionOneSharePerServer(context)) {
 
                 /*