curl-library
Re: libcurl crashes on comparing null pointer
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 24 Jan 2007 12:26:39 +0100 (CET)
Date: Wed, 24 Jan 2007 12:26:39 +0100 (CET)
On Wed, 24 Jan 2007, Shmulik Regev wrote:
> libcurl (7.16.0) crashes on null pointer access in http.c:1720 . The data->
> state.first_host is null. While this can presumably be handled by
> curl_strequal (though it may break its semantics), I've fixed it directly in
> http.c, the patch is below.
Thanks, but can you please clarify on when exactly this happens for you? The
data->state.first_host field should be set in Curl_http_connect() and you
getting NULL in it seems to indicate that strdup() failed there, and then the
proper error would be to bail out there and not continue with it set to
NULL...
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2007-01-24