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:
2
server/modules/filter/cache/rules.cc
vendored
2
server/modules/filter/cache/rules.cc
vendored
@ -1176,7 +1176,7 @@ static bool cache_rule_matches_column_regexp(CACHE_RULE *self,
|
|||||||
table_len = default_table_len;
|
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;
|
buffer[0] = 0;
|
||||||
|
|
||||||
if (database)
|
if (database)
|
||||||
|
Reference in New Issue
Block a user