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/irs Pull up revision 1.2 (requested by it...



details:   https://anonhg.NetBSD.org/src/rev/af9399e7c3e1
branches:  netbsd-1-6
changeset: 528211:af9399e7c3e1
user:      lukem <lukem%NetBSD.org@localhost>
date:      Fri Jun 28 11:50:22 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/irs/irp_gr.c |   9 ++++++---
 dist/bind/lib/irs/irp_ho.c |  17 ++++++++++++++---
 dist/bind/lib/irs/irp_ng.c |  16 +++++++++++-----
 3 files changed, 31 insertions(+), 11 deletions(-)

diffs (144 lines):

diff -r 5ff82ce967d3 -r af9399e7c3e1 dist/bind/lib/irs/irp_gr.c
--- a/dist/bind/lib/irs/irp_gr.c        Fri Jun 28 11:50:13 2002 +0000
+++ b/dist/bind/lib/irs/irp_gr.c        Fri Jun 28 11:50:22 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: irp_gr.c,v 1.1.1.1 1999/11/20 18:54:09 veego Exp $     */
+/*     $NetBSD: irp_gr.c,v 1.1.1.1.10.1 2002/06/28 11:50:22 lukem Exp $        */
 
 /*
  * Portions Copyright(c) 1996, 1998 by Internet Software Consortium.
@@ -18,7 +18,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "Id: irp_gr.c,v 8.1 1999/01/18 07:46:53 vixie Exp";
+static const char rcsid[] = "Id: irp_gr.c,v 8.3 2001/05/29 05:48:57 marka Exp";
 #endif /* LIBC_SCCS and not lint */
 
 /* extern */
@@ -287,7 +287,7 @@
        int code;
        char text[256];
 
-       if (gr->gr_name != NULL && gr->gr_gid == gid) {
+       if (gr->gr_name != NULL && (gid_t)gr->gr_gid == gid) {
                return (gr);
        }
 
@@ -399,6 +399,9 @@
        for (p = gr->gr_mem ; p != NULL && *p != NULL ; p++)
                free(*p);
 
+       if (gr->gr_mem)
+               free(gr->gr_mem);
+
        if (p != NULL)
                free(p);
 }
diff -r 5ff82ce967d3 -r af9399e7c3e1 dist/bind/lib/irs/irp_ho.c
--- a/dist/bind/lib/irs/irp_ho.c        Fri Jun 28 11:50:13 2002 +0000
+++ b/dist/bind/lib/irs/irp_ho.c        Fri Jun 28 11:50:22 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: irp_ho.c,v 1.1.1.1 1999/11/20 18:54:09 veego Exp $     */
+/*     $NetBSD: irp_ho.c,v 1.1.1.1.10.1 2002/06/28 11:50:31 lukem Exp $        */
 
 /*
  * Portions Copyright (c) 1996,1998 by Internet Software Consortium.
@@ -18,7 +18,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "Id: irp_ho.c,v 8.2 1999/10/13 16:39:31 vixie Exp";
+static const char rcsid[] = "Id: irp_ho.c,v 8.3 2001/05/29 05:48:59 marka Exp";
 #endif /* LIBC_SCCS and not lint */
 
 /* Imports. */
@@ -81,7 +81,8 @@
 static void            ho_minimize(struct irs_ho *this);
 
 static void            free_host(struct hostent *ho);
-
+static struct addrinfo * ho_addrinfo(struct irs_ho *this, const char *name,
+                                    const struct addrinfo *pai);
 
 /* Public. */
 
@@ -123,6 +124,7 @@
        ho->next = ho_next;
        ho->rewind = ho_rewind;
        ho->minimize = ho_minimize;
+       ho->addrinfo = ho_addrinfo;
 
        return (ho);
 }
@@ -418,3 +420,12 @@
        }
 }
 
+/* dummy */
+static struct addrinfo *
+ho_addrinfo(struct irs_ho *this, const char *name, const struct addrinfo *pai)
+{
+       UNUSED(this);
+       UNUSED(name);
+       UNUSED(pai);
+       return(NULL);
+}
diff -r 5ff82ce967d3 -r af9399e7c3e1 dist/bind/lib/irs/irp_ng.c
--- a/dist/bind/lib/irs/irp_ng.c        Fri Jun 28 11:50:13 2002 +0000
+++ b/dist/bind/lib/irs/irp_ng.c        Fri Jun 28 11:50:22 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: irp_ng.c,v 1.1.1.1 1999/11/20 18:54:09 veego Exp $     */
+/*     $NetBSD: irp_ng.c,v 1.1.1.1.10.1 2002/06/28 11:50:40 lukem Exp $        */
 
 /*
  * Copyright (c) 1996, 1998 by Internet Software Consortium.
@@ -18,7 +18,7 @@
  */
 
 #if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "Id: irp_ng.c,v 8.2 1999/10/13 16:39:31 vixie Exp";
+static const char rcsid[] = "Id: irp_ng.c,v 8.3 2001/05/29 05:49:00 marka Exp";
 #endif
 
 /* Imports */
@@ -54,7 +54,8 @@
 
 static void            ng_rewind(struct irs_ng *, const char*);
 static void            ng_close(struct irs_ng *);
-static int             ng_next(struct irs_ng *, char **, char **, char **);
+static int             ng_next(struct irs_ng *, const char **, const char **,
+                               const char **);
 static int             ng_test(struct irs_ng *, const char *,
                                const char *, const char *,
                                const char *);
@@ -160,7 +161,8 @@
 
 
 /*
- * int ng_next(struct irs_ng *this, char **host, char **user, char **domain)
+ * int ng_next(struct irs_ng *this, const char **host, const char **user,
+ *            const char **domain)
  *
  * Notes:
  *
@@ -169,7 +171,9 @@
  */
 
 static int
-ng_next(struct irs_ng *this, char **host, char **user, char **domain) {
+ng_next(struct irs_ng *this, const char **host, const char **user,
+        const char **domain)
+{
        struct pvt *pvt = (struct pvt *)this->private;
        int code;
        char *body = NULL;
@@ -226,6 +230,8 @@
        char text[256];
        int rval = 0;
 
+       UNUSED(name);
+
        if (irs_irp_connection_setup(pvt->girpdata, &pvt->warned) != 0) {
                return (0);
        }



Home | Main Index | Thread Index | Old Index