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/bin/nslookup Pull up revision 1.2 (requested ...



details:   https://anonhg.NetBSD.org/src/rev/4b2c66f622b9
branches:  netbsd-1-6
changeset: 528163:4b2c66f622b9
user:      lukem <lukem%NetBSD.org@localhost>
date:      Fri Jun 28 11:37:18 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/bin/nslookup/skip.c |  27 ++++++++++++++-------------
 1 files changed, 14 insertions(+), 13 deletions(-)

diffs (85 lines):

diff -r 44ea25951c20 -r 4b2c66f622b9 dist/bind/bin/nslookup/skip.c
--- a/dist/bind/bin/nslookup/skip.c     Fri Jun 28 11:37:09 2002 +0000
+++ b/dist/bind/bin/nslookup/skip.c     Fri Jun 28 11:37:18 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: skip.c,v 1.1.1.1 1999/11/20 18:54:02 veego Exp $       */
+/*     $NetBSD: skip.c,v 1.1.1.1.10.1 2002/06/28 11:37:18 lukem Exp $  */
 
 /*
  * Copyright (c) 1985, 1989
@@ -55,7 +55,7 @@
 
 #ifndef lint
 static const char sccsid[] = "@(#)skip.c       5.12 (Berkeley) 3/21/91";
-static const char rcsid[] = "Id: skip.c,v 8.5 1999/10/13 16:39:20 vixie Exp";
+static const char rcsid[] = "Id: skip.c,v 8.7 2001/06/20 12:30:35 marka Exp";
 #endif /* not lint */
 
 /*
@@ -86,8 +86,9 @@
 #include <stdio.h>
 
 #include "port_after.h"
+#include "res.h"
 
-char *res_skip_rr();
+static unsigned char *res_skip_rr(unsigned char *cp, unsigned char *eom);
 
 
 /*
@@ -111,13 +112,13 @@
  *******************************************************************************
  */
 
-char *
+unsigned char *
 res_skip(msg, numFieldsToSkip, eom)
-       char *msg;
+       unsigned char *msg;
        int numFieldsToSkip;
-       char *eom;
+       unsigned char *eom;
 {
-       register char *cp;
+       register unsigned char *cp;
        register HEADER *hp;
        register int tmp;
        register int n;
@@ -134,7 +135,7 @@
        n = ntohs(hp->qdcount);
        if (n > 0) {
                while (--n >= 0 && cp < eom) {
-                       tmp = dn_skipname((u_char *)cp, (u_char *)eom);
+                       tmp = dn_skipname(cp, eom);
                        if (tmp == -1) return(NULL);
                        cp += tmp;
                        cp += INT16SZ;  /* type         */
@@ -195,15 +196,15 @@
  *******************************************************************************
  */
 
-char *
+static unsigned char *
 res_skip_rr(cp, eom)
-       char *cp;
-       char *eom;
+       unsigned char *cp;
+       unsigned char *eom;
 {
        int tmp;
        int dlen;
 
-       if ((tmp = dn_skipname((u_char *)cp, (u_char *)eom)) == -1)
+       if ((tmp = dn_skipname(cp, eom)) == -1)
                return (NULL);                  /* compression error */
        cp += tmp;
        if ((cp + RRFIXEDSZ) > eom)
@@ -211,7 +212,7 @@
        cp += INT16SZ;  /*      type    */
        cp += INT16SZ;  /*      class   */
        cp += INT32SZ;  /*      ttl     */
-       dlen = ns_get16((u_char*)cp);
+       dlen = ns_get16(cp);
        cp += INT16SZ;  /*      dlen    */
        cp += dlen;
        if (cp > eom)



Home | Main Index | Thread Index | Old Index