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 99aa74c67b9a525eaecac5f5e7b5d87a26d5f417..858622f56560843dcb3aa79fc43d6f6b8f1d4ecd 100644 (file)
@@ -273,7 +273,7 @@ SMBC_server_internal(TALLOC_CTX *ctx,
          * server...
          */
         if (srv &&
          * server...
          */
         if (srv &&
-            *share != '\0' &&
+           share != NULL && *share != '\0' &&
             smbc_getOptionOneSharePerServer(context)) {
 
                 /*
             smbc_getOptionOneSharePerServer(context)) {
 
                 /*