diff options
Diffstat (limited to 'plugins/check_curl.c')
-rw-r--r-- | plugins/check_curl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c index 2c91a27..5990b95 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c | |||
@@ -1033,8 +1033,8 @@ char* | |||
1033 | uri_string (const UriTextRangeA range, char* buf, size_t buflen) | 1033 | uri_string (const UriTextRangeA range, char* buf, size_t buflen) |
1034 | { | 1034 | { |
1035 | if (!range.first) return "(null)"; | 1035 | if (!range.first) return "(null)"; |
1036 | strncpy (buf, range.first, max (buflen, range.afterLast - range.first)); | 1036 | strncpy (buf, range.first, max (buflen-1, range.afterLast - range.first)); |
1037 | buf[max (buflen, range.afterLast - range.first)] = '\0'; | 1037 | buf[max (buflen-1, range.afterLast - range.first)] = '\0'; |
1038 | buf[range.afterLast - range.first] = '\0'; | 1038 | buf[range.afterLast - range.first] = '\0'; |
1039 | return buf; | 1039 | return buf; |
1040 | } | 1040 | } |