aboutsummaryrefslogtreecommitdiff
path: root/lib/http.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/http.c')
-rw-r--r--lib/http.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/http.c b/lib/http.c
index d01e1bfdb..14d1e89eb 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -3147,6 +3147,9 @@ static CURLcode header_append(struct Curl_easy *data,
struct SingleRequest *k,
size_t length)
{
+ /* length is at most the size of a full read buffer, for which the upper
+ bound is CURL_MAX_READ_SIZE. There is thus no chance of overflow in this
+ calculation. */
size_t newsize = k->hbuflen + length;
if(newsize > CURL_MAX_HTTP_HEADER) {
/* The reason to have a max limit for this is to avoid the risk of a bad