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:
Frdric Lcaille 2019-02-26 18:19:48 +01:00 committed by Willy Tarreau
parent dd1c8f1f72
commit 12a718488a

View File

@ -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;