mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
BUG/MEDIUM: standard: Wrong reallocation size.
The number of bytes to use with "my_realloc2()" in parse_dotted_nums() was wrong: missing multiplication by the size of an element of an array when reallocating it.
This commit is contained in:
parent
dd1c8f1f72
commit
12a718488a
@ -4091,7 +4091,7 @@ int parse_dotted_uints(const char *str, unsigned int **nums, size_t *sz)
|
||||
if (*s != '\0'&& (*s++ != '.' || s == end))
|
||||
return 0;
|
||||
|
||||
n = my_realloc2(n, *sz + 1);
|
||||
n = my_realloc2(n, (*sz + 1) * sizeof *n);
|
||||
if (!n)
|
||||
return 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user