diff --git a/src/main.c b/src/main.c index 888e9666e2b9beb0aac96ebb78d611a8cfdd9f96..826f6f0cece97fb5faaaa4fff38c78a7c64455b9 100644 --- a/src/main.c +++ b/src/main.c @@ -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