cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Crash in curl library while processing HTTP HEAD response

From: Ray Satiro via curl-library <curl-library_at_cool.haxx.se>
Date: Sat, 20 Aug 2016 03:12:49 -0400

On 8/18/2016 7:26 AM, isshed wrote:
> The scenario is as follows.
>
> My application is using HTTPS and sending HEAD request, and is getting
> the above response. I am new for curl lib and am not having much
> understanding of HTTP protocols versions. Also as my application is
> using HTTPs I can not see the wire-capture. Is there anyway I can
> setup server as I can see this problem with one of my customer
> servers. Below is the backtrace I am getting
>
> #############################
> #0 0x40a91ab0 in ?? ()
> #1 0x00463b48 in Curl_client_write (conn=0x15ea3d0, type=1,
> ptr=0x1<Address 0x1 out of bounds>, len=0) at
> /Code/ThirdParty/curl/lib/sendf.c:494
> #2 0x00463b48 in Curl_client_write (conn=0x15ea3d0, type=1,
> ptr=0x15f53d0 "404 - Error: Page Not Found.\r\n", len=30) at
> /Code/ThirdParty/curl/lib/sendf.c:494
> #3 0x00466704 in readwrite_data (done=<value optimized out>,
> didwhat=<value optimized out>, k=<value optimized out>, conn=<value
> optimized out>, data=<value optimized out>) at
> /Code/ThirdParty/curl/lib/transfer.c:613
> #4 Curl_readwrite (conn=0x15ea3d0, done=0x15ea490 "") at
> /Code/ThirdParty/curl/lib/transfer.c:1620
> #5 0x00466ee4 in Transfer (conn=<value optimized out>) at
> /Code/ThirdParty/curl/lib/transfer.c:1876
> #6 Curl_perform (data=0x15d4670) at /Code/ThirdParty/curl/lib/transfer.c:2501
> #############################

Please send us a minimal self-contained example that we can use to
reproduce. I don't know if this was mentioned already but in your case
even though you chose CURLOPT_NOBODY [1] the data still goes to the
write function (CURLOPT_WRITEFUNCTION [2], CURLOPT_WRITEDATA [3]) since
there doesn't appear to be a proper response. I guess an issue is
whether or not that's correct for NOBODY but also I guess on your end
your write function is probably crashing. You'd have to build in
debugging mode to get a good stack that you can walk through.

And please stop top-posting [4], it makes the thread difficult to
follow. My apologies if any of the above has already been covered the
thread was maddening to read so I just skimmed it.

[1]: https://curl.haxx.se/libcurl/c/CURLOPT_NOBODY.html
[2]: https://curl.haxx.se/libcurl/c/CURLOPT_WRITEFUNCTION.html
[3]: https://curl.haxx.se/libcurl/c/CURLOPT_WRITEDATA.html
[4]: https://curl.haxx.se/mail/etiquette.html#Do_Not_Top_Post

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-08-20