Module: monitoring-plugins Branch: feature_check_curl Commit: d9a5d1faf0400b9da47dee516c035da1a93dc12c Author: Andreas Baumann <m...@andreasbaumann.cc> Date: Tue Jan 19 18:35:41 2021 +0100 URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=d9a5d1f
check_curl: fixed a potential buffer overflow in url buffer --- plugins/check_curl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/check_curl.c b/plugins/check_curl.c index ef77918..a3f63f1 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c @@ -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); } }