Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/net be more picky about size arg



details:   https://anonhg.NetBSD.org/src/rev/d31d34fda92c
branches:  trunk
changeset: 535371:d31d34fda92c
user:      itojun <itojun%NetBSD.org@localhost>
date:      Fri Aug 16 12:23:20 2002 +0000

description:
be more picky about size arg

diffstat:

 lib/libc/net/inet_net_ntop.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r abb41ecdb356 -r d31d34fda92c lib/libc/net/inet_net_ntop.c
--- a/lib/libc/net/inet_net_ntop.c      Fri Aug 16 12:20:19 2002 +0000
+++ b/lib/libc/net/inet_net_ntop.c      Fri Aug 16 12:23:20 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: inet_net_ntop.c,v 1.16 2002/08/16 12:20:19 itojun Exp $        */
+/*     $NetBSD: inet_net_ntop.c,v 1.17 2002/08/16 12:23:20 itojun Exp $        */
 
 /*
  * Copyright (c) 1996,1999 by Internet Software Consortium.
@@ -22,7 +22,7 @@
 #if 0
 static const char rcsid[] = "Id: inet_net_ntop.c,v 1.8 2001/09/27 15:08:36 marka Exp ";
 #else
-__RCSID("$NetBSD: inet_net_ntop.c,v 1.16 2002/08/16 12:20:19 itojun Exp $");
+__RCSID("$NetBSD: inet_net_ntop.c,v 1.17 2002/08/16 12:23:20 itojun Exp $");
 #endif
 #endif
 
@@ -99,7 +99,7 @@
        _DIAGASSERT(dst != NULL);
 
        ep = dst + size;
-       if (ep < dst)
+       if (ep <= dst)
                goto emsgsize;
 
        if (bits < 0 || bits > 32) {



Home | Main Index | Thread Index | Old Index