From e3c927ec9135e599a0b75748b711282e819fd9ea Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Fri, 25 Aug 2023 21:31:04 -0300 Subject: [PATCH] Call inrange when we have an integer above 99 Anything below three digits couldn't be out of bounds. --- src/isinetaddr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/isinetaddr.c b/src/isinetaddr.c index b0acc39..086e197 100644 --- a/src/isinetaddr.c +++ b/src/isinetaddr.c @@ -25,7 +25,7 @@ isinetaddr(const char *str) if (str[l] == '.') { if (j == 1 && i == 0) { return 0; - } else if (k > 0 && !inrange(buf)) { + } else if (k == 3 && !inrange(buf)) { return 0; } else { k = 0;