mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-12 08:27:24 +00:00
BUG/MEDIUM: variables: some variable name can hide another ones
The variable are compared only using text, the final '\0' (or the string length) are not checked. So, the variable name "txn.internal" matchs other one call "txn.int". This patch fix this behavior It must be backported ni 1.6 and 1.7
This commit is contained in:
parent
fb981bd7d1
commit
d2f6f47597
@ -201,7 +201,7 @@ static char *register_name(const char *name, int len, enum vars_scope *scope,
|
||||
|
||||
/* Look for existing variable name. */
|
||||
for (i = 0; i < var_names_nb; i++)
|
||||
if (strncmp(var_names[i], name, len) == 0)
|
||||
if (strncmp(var_names[i], name, len) == 0 && var_names[i][len] == '\0')
|
||||
return var_names[i];
|
||||
|
||||
if (!alloc)
|
||||
|
Loading…
Reference in New Issue
Block a user