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 committed by Jan Wagner
parent 0484aed02b
commit d5b81e8966

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);
}
}