summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-05-09 12:29:28 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-05-09 12:29:28 +0000
commitb64dd9c13fb63324b75561fe564155746bc51b4c (patch)
tree90783e5830b4fc102eb6d29dc5c46bfdd464403e /src/main.c
parentfac113a275e71ea396824f9f666100a03e4e215f (diff)
downloadcurl-b64dd9c13fb63324b75561fe564155746bc51b4c.tar.gz
changed the glob_url() call, after Janne Johansson's buffer overflow report
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 7438b0e0e..cadc9cf44 100644
--- a/src/main.c
+++ b/src/main.c
@@ -961,12 +961,16 @@ int main(int argc, char *argv[])
return URG_FAILED_INIT;
}
#if 0
- fprintf(stderr, "URL: %s PROXY: %s\n", url, config.proxy?config.proxy:"none");
+ fprintf(stderr, "URL: %s PROXY: %s\n", url, config.proxy?config.proxy:"none");
#endif
#ifdef GLOBURL
- urlnum = glob_url(&urls, url); /* expand '{...}' and '[...]' expressions and return
- total number of URLs in pattern set */
+ /* expand '{...}' and '[...]' expressions and return total number of URLs
+ in pattern set */
+ res = glob_url(&urls, url, &urlnum);
+ if(res != URG_OK)
+ return res;
+
outfiles = config.outfile; /* save outfile pattern befor expansion */
if (!outfiles && !config.remotefile && urlnum > 1) {
#ifdef CURL_SEPARATORS