cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Crash in curl library while processing HTTP HEAD response

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 18 Aug 2016 11:50:04 +0200 (CEST)

On Thu, 18 Aug 2016, isshed wrote:

> I am new to the curl library. I am facing a crash in the curl library while
> processing HTTP HEAD Request. After analyzing the crash dump I found that
> HEAD response is coming as "404 - Error: Page Not Found.\r\n" which is in
> plain text.

You mean you get no headers at all back and just that body? Thus being
"HTTP/0.9" ?

> I guess this is the problem. readwrite_http_headers() function could
> not parse it

...

> Please let me know which fix I should finalize. Or do you suggest some new
> fix. if this has some problem. I am eagerly waiting for your reply.

We can't have code that writes to stdout like that, but before we consider the
fix, can we try to reproduce problem reliably?

I just wrote up test 1144 and pushed to git [1] that attempts to reproduce but
I can't make curl crash on that. Can you? Or can you detect how that test case
differs from your scenario?

[1] = https://github.com/curl/curl/commit/cdd61dc35

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