aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/http_chunks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/http_chunks.c b/lib/http_chunks.c
index 47de95845..83e3f0eec 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 */
}