ngtcp2: Reset dynbuf when it is fully drained

Reported-by: vl409 on github
Fixes #7351
Closes #8504
This commit is contained in:
Tatsuhiro Tsujikawa 2022-02-24 19:06:43 +09:00 committed by Daniel Stenberg
parent 8a1fa3b364
commit 6e9373b5f4
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 2 additions and 5 deletions

View file

@ -1220,6 +1220,8 @@ static size_t drain_overflow_buffer(struct HTTP *stream)
if(ncopy != overlen)
/* make the buffer only keep the tail */
(void)Curl_dyn_tail(&stream->overflow, overlen - ncopy);
else
Curl_dyn_reset(&stream->overflow);
}
return ncopy;
}