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.
This commit is contained in:
Markus Mäkelä 2018-09-30 19:45:14 +03:00
parent 4554bd1743
commit ceb763c9be
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -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)