Source-Changes-HG archive

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

[src/netbsd-3]: src/lib/libc/net Pull up revision 1.32 (requested by lukem in...



details:   https://anonhg.NetBSD.org/src/rev/5f66ea22940f
branches:  netbsd-3
changeset: 576181:5f66ea22940f
user:      tron <tron%NetBSD.org@localhost>
date:      Sat Jun 11 12:12:11 2005 +0000

description:
Pull up revision 1.32 (requested by lukem in ticket #392):
Move the test for "more strict reverse lookup handling" to the correct
location so that an uninitialized `in' won't be used if net_i == BYADDR.
Detected with gcc -Wuninitialized, confirmed by diffing against BIND 4.9.11.
(The bug was introduced in rev 1.26.  Hi Itojun! :)

diffstat:

 lib/libc/net/getnetnamadr.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 2bbdc5b05ebe -r 5f66ea22940f lib/libc/net/getnetnamadr.c
--- a/lib/libc/net/getnetnamadr.c       Sat Jun 11 12:09:53 2005 +0000
+++ b/lib/libc/net/getnetnamadr.c       Sat Jun 11 12:12:11 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: getnetnamadr.c,v 1.31 2004/05/23 16:54:13 christos Exp $       */
+/*     $NetBSD: getnetnamadr.c,v 1.31.2.1 2005/06/11 12:12:11 tron Exp $       */
 
 /* Copyright (c) 1993 Carlos Leandro and Rui Salgueiro
  *     Dep. Matematica Universidade de Coimbra, Portugal, Europe
@@ -43,7 +43,7 @@
 static char sccsid_[] = "from getnetnamadr.c   1.4 (Coimbra) 93/06/03";
 static char rcsid[] = "Id: getnetnamadr.c,v 8.8 1997/06/01 20:34:37 vixie Exp ";
 #else
-__RCSID("$NetBSD: getnetnamadr.c,v 1.31 2004/05/23 16:54:13 christos Exp $");
+__RCSID("$NetBSD: getnetnamadr.c,v 1.31.2.1 2005/06/11 12:12:11 tron Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -228,11 +228,11 @@
                                paux1 = pauxt;
                                in = ++st;
                        }                 
+                       if (strcasecmp(in, "IN-ADDR.ARPA") != 0)
+                               goto next_alias;
                        net_entry.n_net = inet_network(paux2);
                        break;
                }
-               if (strcasecmp(in, "IN-ADDR.ARPA") != 0)
-                       goto next_alias;
                net_entry.n_aliases++;
 #if (defined(__sparc__) && defined(_LP64)) ||          \
     defined(__alpha__) ||                              \



Home | Main Index | Thread Index | Old Index