From ceb763c9be1248e6a30a15f9e6540558bb78ab43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Sun, 30 Sep 2018 19:45:14 +0300 Subject: [PATCH] Fix buffer size in cache rules If a database, table and a column was defined, the null terminating character would be written past the end of the buffer. --- server/modules/filter/cache/rules.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/filter/cache/rules.cc b/server/modules/filter/cache/rules.cc index 8c32f995d..a49197c0f 100644 --- a/server/modules/filter/cache/rules.cc +++ b/server/modules/filter/cache/rules.cc @@ -1176,7 +1176,7 @@ static bool cache_rule_matches_column_regexp(CACHE_RULE *self, table_len = default_table_len; } - char buffer[database_len + 1 + table_len + strlen(info->column) + 1]; + char buffer[database_len + 1 + table_len + 1 + strlen(info->column) + 1]; buffer[0] = 0; if (database)