s3:net registry: fix segfault when net registry is called without subcommands...
authorMichael Adam <obnox@samba.org>
Fri, 14 Oct 2011 14:19:03 +0000 (16:19 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 14 Oct 2011 15:51:53 +0000 (17:51 +0200)
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Oct 14 17:51:53 CEST 2011 on sn-devel-104

source3/utils/net_registry.c

index 1d9546a8bde2eee03541d1a099033a2b6da0d128..3c9177df52d5875f507606933fbabff355d0b7b1 100644 (file)
@@ -1447,6 +1447,7 @@ int net_registry(struct net_context *c, int argc, const char **argv)
        };
 
        if (!c->display_usage
+           && argc > 0
            && (strcasecmp_m(argv[0], "convert") != 0)
            && (strcasecmp_m(argv[0], "check") != 0))
        {