summaryrefslogtreecommitdiff
path: root/net/bind9/patches/patch-ap
blob: 8e4642918d56c4b97749ad3d0964d704d178a0ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$NetBSD: patch-ap,v 1.3 2008/05/11 00:00:59 tonnerre Exp $

--- lib/bind/inet/inet_network.c.orig	2005-04-27 07:00:54.000000000 +0200
+++ lib/bind/inet/inet_network.c
@@ -84,9 +84,9 @@ again:
 	}
 	if (!digit)
 		return (INADDR_NONE);
+	if (pp >= parts + 4 || val > 0xffU)
+		return (INADDR_NONE);
 	if (*cp == '.') {
-		if (pp >= parts + 4 || val > 0xffU)
-			return (INADDR_NONE);
 		*pp++ = val, cp++;
 		goto again;
 	}