Merge "Fix the bound size and the variable name"

This commit is contained in:
Treehugger Robot 2018-11-14 21:13:02 +00:00 committed by Gerrit Code Review
commit 5791e6eeeb

View File

@ -742,7 +742,7 @@ static rule_map *rule_map_new(kvp keys[], size_t num_of_keys, int lineno,
/* Only assign key name to map name */
if (strcasecmp(k->key, x->name)) {
if (i == KVP_NUM_OF_RULES) {
if (j == KVP_NUM_OF_RULES - 1) {
log_error("No match for key: %s\n", k->key);
goto err;
}