Source-Changes-HG archive

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

[src/trunk]: src/dist/bind/lib/nameser Fix bug introduced in previous rev 1.5...



details:   https://anonhg.NetBSD.org/src/rev/dbe92bd204b7
branches:  trunk
changeset: 533903:dbe92bd204b7
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Wed Jul 10 19:30:14 2002 +0000

description:
Fix bug introduced in previous rev 1.5 - the for() body in decode_bitstring()
needs to be wrapped with curly braces.
Pointed out by Greg A. Woods in bin/17525.

diffstat:

 dist/bind/lib/nameser/ns_name.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r 65708715d07e -r dbe92bd204b7 dist/bind/lib/nameser/ns_name.c
--- a/dist/bind/lib/nameser/ns_name.c   Wed Jul 10 19:15:42 2002 +0000
+++ b/dist/bind/lib/nameser/ns_name.c   Wed Jul 10 19:30:14 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ns_name.c,v 1.5 2002/07/04 23:30:40 itojun Exp $       */
+/*     $NetBSD: ns_name.c,v 1.6 2002/07/10 19:30:14 jdolecek Exp $     */
 
 /*
  * Copyright (c) 1996,1999 by Internet Software Consortium.
@@ -804,11 +804,12 @@
        if (i < 0)
                return (-1);
        dn += i;
-       for (b = blen; b > 7; b -= 8, cp++)
+       for (b = blen; b > 7; b -= 8, cp++) {
                i = SPRINTF((dn, "%02x", *cp & 0xff));
                if (i < 0)
                        return (-1);
                dn += i;
+       }
        if (b > 4) {
                tc = *cp++;
                i = SPRINTF((dn, "%02x", tc & (0xff << (8 - b))));



Home | Main Index | Thread Index | Old Index