From 62a4a93dec9a0dfba2e6d41934427d18cd985b41 Mon Sep 17 00:00:00 2001 From: Martin Lund Date: Fri, 3 May 2024 08:39:58 +0200 Subject: [PATCH] Fix potential buffer overflow in match_and_replace() --- src/configfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configfile.c b/src/configfile.c index d26234c..22cf225 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -407,7 +407,7 @@ static void replace_substring(char *str, const char *substr, const char *replace static char *match_and_replace(const char *str, const char *pattern, char *device) { char replacement_str[PATH_MAX] = {}; - char m_key[13] = {}; + char m_key[14] = {}; regex_t regex; assert(str != NULL);