]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
fixed crash in config file parser
authorDaniel Stenberg <daniel@haxx.se>
Wed, 15 Nov 2000 20:45:29 +0000 (20:45 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 15 Nov 2000 20:45:29 +0000 (20:45 +0000)
src/main.c

index 82cee7313ee8a28a665129b8c355970ca8637911..9e5145ce0dd822fec5f22b2f8733f43b2a4f94be 100644 (file)
@@ -1016,7 +1016,7 @@ static int parseconfig(char *filename,
         res = getparameter(tok1 + 1, tok2, &usedarg, config);
         free(tok1);
         if (!usedarg) {
-          if ('-' != tok2[0]) {
+          if (tok2 && ('-' != tok2[0])) {
             /* this is not an option, this is a URL */
             if (config->url)
               free(config->url);