mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-20 01:22:48 -04: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue