Fix 'CVE-2018-1000005'

Merge: curl/curl@fa3dbb9a14
This commit is contained in:
Kawe Mazidjatari 2023-06-12 19:47:37 +02:00
parent d000c0c3b3
commit 2905bcad53

View File

@ -880,8 +880,8 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame,
if(stream->bodystarted) {
/* This is trailer fields. */
/* 3 is for ":" and "\r\n". */
uint32_t n = (uint32_t)(namelen + valuelen + 3);
/* 4 is for ":" and "\r\n". */
uint32_t n = (uint32_t)(namelen + valuelen + 4);
DEBUGF(infof(data_s, "h2 trailer: %.*s: %.*s\n", namelen, name, valuelen,
value));