]> granicus.if.org Git - curl/commitdiff
In case the output urlglob file name returned is NULL, then there was
authorDaniel Stenberg <daniel@haxx.se>
Thu, 14 Aug 2003 11:53:53 +0000 (11:53 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 14 Aug 2003 11:53:53 +0000 (11:53 +0000)
badness in the string and we help our user by returning an error.

src/main.c

index 888e9666e2b9beb0aac96ebb78d611a8cfdd9f96..826f6f0cece97fb5faaaa4fff38c78a7c64455b9 100644 (file)
@@ -2763,6 +2763,12 @@ operate(struct Configurable *config, int argc, char *argv[])
           char *storefile = outfile;
           outfile = glob_match_url(storefile, urls);
           free(storefile);
+          if(!outfile) {
+            /* bad globbing */
+            helpf("bad output glob!\n");
+            return CURLE_FAILED_INIT;
+          }
+
         }
       
         /* Create the directory hierarchy, if not pre-existant to a multiple