diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-09-13 23:08:45 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-09-14 08:29:46 +0200 |
commit | 9fffe925d2049d925dbc4b52beda5b35c7b3aaa5 (patch) | |
tree | 9f17dd6e0d4f56149e2b67b835f72ed8c315dab7 /lib/dynbuf.c | |
parent | 5fbc3ee5200373820e14082fa7e96372506986bf (diff) | |
download | curl-9fffe925d2049d925dbc4b52beda5b35c7b3aaa5.tar.gz |
dynbuf: make sure Curl_dyn_tail() zero terminates
Closes #5959
Diffstat (limited to 'lib/dynbuf.c')
-rw-r--r-- | lib/dynbuf.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |