mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
BUG/MINOR: arg: fix again incorrect argument length check
Recent commit 807aef8a14
("BUG/MINOR: arg: report an error if an argument
is larger than bufsize") aimed at fixing the argument length check but
relied on the fact that the end of string was not reached, except that
it forgot to consider the delimiters (comma and parenthesis) which are
valid conditions to break out of the loop. This used to break simple
expressions like "hdr(xff,1)". Thanks to Jrme for reporting this.
No backport is needed.
This commit is contained in:
parent
6328b73d28
commit
9af749b43e
@ -214,7 +214,7 @@ int make_arg_list(const char *in, int len, uint64_t mask, struct arg **argp,
|
|||||||
trash.data = out - trash.area;
|
trash.data = out - trash.area;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (len && *in)
|
if (len && *in && *in != ',' && *in != ')')
|
||||||
goto buffer_err;
|
goto buffer_err;
|
||||||
|
|
||||||
trash.area[trash.data] = 0;
|
trash.area[trash.data] = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user