dynbuf: make sure Curl_dyn_tail() zero terminates

Closes #5959
This commit is contained in:
Daniel Stenberg 2020-09-13 23:08:45 +02:00
parent 5fbc3ee520
commit 9fffe925d2
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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;