From 3ec713da8bbe90837d7c69544b0ebd1b5efbedea Mon Sep 17 00:00:00 2001 From: lda Date: Wed, 20 Mar 2024 15:37:52 +0100 Subject: [PATCH] [FIX] Check the number of digits with IPv6(up to 8) Also fixes a warning (-Wno-unused-but-set-variable). --- src/Parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Parser.c b/src/Parser.c index f003b4c..705ea2c 100644 --- a/src/Parser.c +++ b/src/Parser.c @@ -152,7 +152,7 @@ ParseIPv6(char **str, char **out) goto fail; } - while ((c = Iterate(str)) && IsIPv6Char(c)) + while ((c = Iterate(str)) && IsIPv6Char(c) && digits < 8) { char *ipv4; if (isxdigit(c))