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.4 (requested by it...



details:   https://anonhg.NetBSD.org/src/rev/5ff82ce967d3
branches:  netbsd-1-6
changeset: 528210:5ff82ce967d3
user:      lukem <lukem%NetBSD.org@localhost>
date:      Fri Jun 28 11:50:13 2002 +0000

description:
Pull up revision 1.4 (requested by itojun in ticket #387):
Update to BIND 8.3.3.  Fixes buffer overrun in resolver code.

diffstat:

 dist/bind/lib/irs/irp.c |  14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diffs (49 lines):

diff -r 1ce00fdd35c6 -r 5ff82ce967d3 dist/bind/lib/irs/irp.c
--- a/dist/bind/lib/irs/irp.c   Fri Jun 28 11:50:05 2002 +0000
+++ b/dist/bind/lib/irs/irp.c   Fri Jun 28 11:50:13 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: irp.c,v 1.3 2001/09/24 13:22:28 wiz Exp $      */
+/*     $NetBSD: irp.c,v 1.3.2.1 2002/06/28 11:50:13 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.c,v 8.6 2000/02/04 08:28:33 vixie Exp";
+static const char rcsid[] = "Id: irp.c,v 8.8 2001/09/25 04:50:29 marka Exp";
 #endif
 
 /* Imports */
@@ -86,6 +86,8 @@
        struct irs_acc *acc;
        struct irp_p *irp;
 
+       UNUSED(options);
+
        if (!(acc = memget(sizeof *acc))) {
                errno = ENOMEM;
                return (NULL);
@@ -389,9 +391,9 @@
                code = 0;
        } else if (text != NULL && textlen > 0) {
                p = line;
-               while (isspace(*p)) p++;
-               while (isdigit(*p)) p++;
-               while (isspace(*p)) p++;
+               while (isspace((unsigned char)*p)) p++;
+               while (isdigit((unsigned char)*p)) p++;
+               while (isspace((unsigned char)*p)) p++;
                strncpy(text, p, textlen - 1);
                p[textlen - 1] = '\0';
        }
@@ -540,7 +542,7 @@
        va_start(ap, fmt);
        todo = vsprintf(buffer, fmt, ap);
        va_end(ap);
-       if (todo > sizeof buffer - 2) {
+       if (todo > (int)sizeof(buffer) - 3) {
                syslog(LOG_CRIT, "memory overrun in irs_irp_send_command()");
                exit(1);
        }



Home | Main Index | Thread Index | Old Index