From 9fffe925d2049d925dbc4b52beda5b35c7b3aaa5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 13 Sep 2020 23:08:45 +0200 Subject: [PATCH] dynbuf: make sure Curl_dyn_tail() zero terminates Closes #5959 --- lib/dynbuf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/dynbuf.c b/lib/dynbuf.c index 38d370b07..265a769e8 100644 --- a/lib/dynbuf.c +++ b/lib/dynbuf.c @@ -143,6 +143,7 @@ CURLcode Curl_dyn_tail(struct dynbuf *s, size_t trail) else { memmove(&s->bufr[0], &s->bufr[s->leng - trail], trail); s->leng = trail; + s->bufr[s->leng] = 0; } return CURLE_OK;