curl-library
Re: problem with curl 7.35 using MinGW
Date: Thu, 13 Feb 2014 07:15:51 -0500
Daniel Stenberg wrote:
> Argh yes! The code is not detecting the overflow correctly - we must check
> both for a maximum value and the ERANGE and not only the latter! Can you just
> confirm that this fix works for you?
That appears to have fixed it. Works fine for my test cases on MinGW. Thanks.
Sincerely,
Laura
http://www.distasis.com/cpp
> diff --git a/lib/http_chunks.c b/lib/http_chunks.c
> index 47de958..83e3f0e 100644
> --- a/lib/http_chunks.c
> +++ b/lib/http_chunks.c
> @@ -162,8 +162,8 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
> }
>
> ch->datasize=curlx_strtoofft(ch->hexbuffer, &endptr, 16);
> - if(errno == ERANGE)
> - /* over or underflow is an error */
> + if((ch->datasize == CURL_OFF_T_MAX) && (errno == ERANGE))
> + /* overflow is an error */
> return CHUNKE_ILLEGAL_HEX;
> ch->state = CHUNK_LF; /* now wait for the CRLF */
> }
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-02-13