cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Access Violation with curl 7.4.2 under windows nt4 with confi g file and -v

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 15 Nov 2000 21:40:53 +0100 (MET)

On Wed, 15 Nov 2000 Joern.Hartroth_at_comma-soft.com wrote:

> Could someone please check if similar errors occur on non-Win systems,
> too?

It does. Try this:

diff -u -r1.41 main.c
--- main.c 2000/11/13 11:59:19 1.41
+++ main.c 2000/11/15 20:40:04
@@ -1016,7 +1016,7 @@
         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);

... I'll add a test case for this right now! ;-)

-- 
  Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
Received on 2000-11-15