check_curl: fixed a potential buffer overflow in url buffer

This commit is contained in:
Andreas Baumann 2021-01-19 18:35:41 +01:00
parent ede8defad4
commit d9a5d1faf0

View file

@ -1041,7 +1041,7 @@ redir (curlhelp_write_curlbuf* header_buf)
const UriPathSegmentA* p = uri.pathHead;
for (; p; p = p->next) {
strncat (new_url, "/", DEFAULT_BUFFER_SIZE);
strncat (new_url, uri_string (p->text, buf, DEFAULT_BUFFER_SIZE), DEFAULT_BUFFER_SIZE);
strncat (new_url, uri_string (p->text, buf, DEFAULT_BUFFER_SIZE), DEFAULT_BUFFER_SIZE-1);
}
}