From: minfrin Date: Mon, 1 Nov 2021 09:54:59 +0000 (+0200) Subject: Set the buffer size to the new maximum length for a digest. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2fd4f344a736287d10ca3c0527b7e4eaee399dee;p=thirdparty%2Fcollectd.git Set the buffer size to the new maximum length for a digest. --- diff --git a/src/snmp.c b/src/snmp.c index 401de7414..39bbab66a 100644 --- a/src/snmp.c +++ b/src/snmp.c @@ -36,6 +36,9 @@ #include +/* SHA512 plus a trailing nul */ +#define MAX_DIGEST_NAME_LEN 7 + /* * Private data structes */ @@ -667,7 +670,7 @@ static int csnmp_config_add_host_collect(host_definition_t *host, static int csnmp_config_add_host_auth_protocol(host_definition_t *hd, oconfig_item_t *ci) { - char buffer[4]; + char buffer[MAX_DIGEST_NAME_LEN]; int status; status = cf_util_get_string_buffer(ci, buffer, sizeof(buffer));