Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/dist/bind/lib/inet Pull up revision 1.2 (requested by i...
details: https://anonhg.NetBSD.org/src/rev/36b494cad58d
branches: netbsd-1-6
changeset: 528192:36b494cad58d
user: lukem <lukem%NetBSD.org@localhost>
date: Fri Jun 28 11:45:38 2002 +0000
description:
Pull up revision 1.2 (requested by itojun in ticket #387):
Update to BIND 8.3.3. Fixes buffer overrun in resolver code.
diffstat:
dist/bind/lib/inet/inet_pton.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (32 lines):
diff -r cc214a60cc8b -r 36b494cad58d dist/bind/lib/inet/inet_pton.c
--- a/dist/bind/lib/inet/inet_pton.c Fri Jun 28 11:45:29 2002 +0000
+++ b/dist/bind/lib/inet/inet_pton.c Fri Jun 28 11:45:38 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inet_pton.c,v 1.1.1.1 1999/11/20 18:54:08 veego Exp $ */
+/* $NetBSD: inet_pton.c,v 1.1.1.1.10.1 2002/06/28 11:45:38 lukem Exp $ */
/*
* Copyright (c) 1996,1999 by Internet Software Consortium.
@@ -18,7 +18,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "Id: inet_pton.c,v 1.7 1999/10/13 16:39:28 vixie Exp";
+static const char rcsid[] = "Id: inet_pton.c,v 1.8 2001/07/16 03:22:24 marka Exp";
#endif /* LIBC_SCCS and not lint */
#include "port_before.h"
@@ -97,10 +97,12 @@
if ((pch = strchr(digits, ch)) != NULL) {
u_int new = *tp * 10 + (pch - digits);
+ if (saw_digit && *tp == 0)
+ return (0);
if (new > 255)
return (0);
*tp = new;
- if (! saw_digit) {
+ if (!saw_digit) {
if (++octets > 4)
return (0);
saw_digit = 1;
Home |
Main Index |
Thread Index |
Old Index