s3-net: Check the return value of strlower_m().
authorAndreas Schneider <asn@samba.org>
Mon, 10 Dec 2012 16:36:39 +0000 (17:36 +0100)
committerGünther Deschner <gd@samba.org>
Wed, 12 Dec 2012 08:42:32 +0000 (09:42 +0100)
Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source3/utils/net_rpc.c

index 2ccc92876bc2a43c1102d991d6cf71ad2b401ac0..c112a15e7635c6df5d431a82fc26e19a5e7ffabf 100644 (file)
@@ -369,7 +369,9 @@ static NTSTATUS rpc_oldjoin_internals(struct net_context *c,
        }
 
        fstrcpy(trust_passwd, lp_netbios_name());
-       strlower_m(trust_passwd);
+       if (!strlower_m(trust_passwd)) {
+               return NT_STATUS_UNSUCCESSFUL;
+       }
 
        /*
         * Machine names can be 15 characters, but the max length on