Fix bug 6014 -- mget shouldn't segfault without arguments
authorVolker Lendecke <vl@samba.org>
Mon, 5 Jan 2009 14:47:19 +0000 (15:47 +0100)
committerVolker Lendecke <vl@samba.org>
Mon, 5 Jan 2009 14:53:26 +0000 (15:53 +0100)
Thanks to kevin.paulus@mtm.kuleuven.be for the bug report

Volker

source3/client/client.c

index 529f21ab302d649d9dc0d475d3f40d9d8f15b77f..c40c04e9c676b35051186cb727f5d08acc0d8e99 100644 (file)
@@ -1353,6 +1353,11 @@ static int cmd_mget(void)
                do_list(mget_mask, attribute, do_mget, false, true);
        }
 
+       if (mget_mask == NULL) {
+               d_printf("nothing to mget\n");
+               return 0;
+       }
+
        if (!*mget_mask) {
                mget_mask = talloc_asprintf(ctx,
                                        "%s*",