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;