From fe60fc473046335b836c4a2b57a5fb1bccb960f5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 14 Aug 2003 11:53:53 +0000 Subject: In case the output urlglob file name returned is NULL, then there was badness in the string and we help our user by returning an error. --- src/main.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 888e9666e..826f6f0ce 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 -- cgit v1.2.3