summaryrefslogtreecommitdiffstats
path: root/bind-9.5-CVE-2008-0122.patch
blob: 38e0a4b99f258d5623ded208dcffc863652f93eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Index: lib/bind/inet/inet_network.c
===================================================================
RCS file: /var/snap/bind9/lib/bind/inet/inet_network.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- lib/bind/inet/inet_network.c	27 Apr 2005 04:56:21 -0000	1.5
+++ lib/bind/inet/inet_network.c	15 Jan 2008 04:02:01 -0000	1.6
@@ -84,9 +84,9 @@
 	}
 	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;
 	}