aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_curl.c
diff options
context:
space:
mode:
authorGravatar Andreas Baumann <mail@andreasbaumann.cc> 2021-01-19 18:35:41 +0100
committerGravatar Andreas Baumann <mail@andreasbaumann.cc> 2021-01-19 18:35:41 +0100
commitd9a5d1faf0400b9da47dee516c035da1a93dc12c (patch)
treebfb6aee8a66a612618e56874a933b3b98529adb9 /plugins/check_curl.c
parentede8defad4f44478f69e148022b542a694498087 (diff)
downloadmonitoring-plugins-d9a5d1faf0400b9da47dee516c035da1a93dc12c.tar.gz
check_curl: fixed a potential buffer overflow in url buffer
Diffstat (limited to 'plugins/check_curl.c')
-rw-r--r--plugins/check_curl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index ef77918b..a3f63f16 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);
}
}