mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 23:56:57 +02:00
BUG/MINOR: parse: check the validity of size string in a more strict way
If a stick table is defined as below: stick-table type ip size 50ka expire 300s HAProxy will stop parsing size after passing through "50k" and return the value directly. But such format string of size should not be valid. The patch checks the next character to report error if any. Signed-off-by: Godbach <nylzhaowei@gmail.com>
This commit is contained in:
parent
9770787e70
commit
58048a2dc9
@ -1656,6 +1656,9 @@ const char *parse_size_err(const char *text, unsigned *ret) {
|
||||
return text;
|
||||
}
|
||||
|
||||
if (*text != '\0' && *++text != '\0')
|
||||
return text;
|
||||
|
||||
*ret = value;
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user