From 12a718488a91810bfdead2aa59d751a92fe7a080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Tue, 26 Feb 2019 18:19:48 +0100 Subject: [PATCH] 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. --- src/standard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/standard.c b/src/standard.c index 86dee4405..24e014aa8 100644 --- a/src/standard.c +++ b/src/standard.c @@ -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;