summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libc/net/inet_net_pton.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libc/net/inet_net_pton.c b/src/lib/libc/net/inet_net_pton.c
index 9bb35478ca..3105c33b43 100644
--- a/src/lib/libc/net/inet_net_pton.c
+++ b/src/lib/libc/net/inet_net_pton.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: inet_net_pton.c,v 1.5 2005/08/06 20:30:03 espie Exp $ */ 1/* $OpenBSD: inet_net_pton.c,v 1.6 2008/09/01 09:40:43 markus Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1996 by Internet Software Consortium. 4 * Copyright (c) 1996 by Internet Software Consortium.
@@ -142,12 +142,12 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size)
142 assert(n >= 0 && n <= 9); 142 assert(n >= 0 && n <= 9);
143 bits *= 10; 143 bits *= 10;
144 bits += n; 144 bits += n;
145 if (bits > 32)
146 goto emsgsize;
145 } while ((ch = *src++) != '\0' && 147 } while ((ch = *src++) != '\0' &&
146 isascii(ch) && isdigit(ch)); 148 isascii(ch) && isdigit(ch));
147 if (ch != '\0') 149 if (ch != '\0')
148 goto enoent; 150 goto enoent;
149 if (bits > 32)
150 goto emsgsize;
151 } 151 }
152 152
153 /* Firey death and destruction unless we prefetched EOS. */ 153 /* Firey death and destruction unless we prefetched EOS. */