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



details:   https://anonhg.NetBSD.org/src/rev/da72721011f9
branches:  netbsd-1-6
changeset: 528184:da72721011f9
user:      lukem <lukem%NetBSD.org@localhost>
date:      Fri Jun 28 11:43:30 2002 +0000

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

diffstat:

 dist/bind/lib/dst/hmac_link.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (50 lines):

diff -r fd4e7ac9fc8f -r da72721011f9 dist/bind/lib/dst/hmac_link.c
--- a/dist/bind/lib/dst/hmac_link.c     Fri Jun 28 11:43:22 2002 +0000
+++ b/dist/bind/lib/dst/hmac_link.c     Fri Jun 28 11:43:30 2002 +0000
@@ -1,8 +1,8 @@
-/*     $NetBSD: hmac_link.c,v 1.2 2001/01/27 07:22:03 itojun Exp $     */
+/*     $NetBSD: hmac_link.c,v 1.2.2.1 2002/06/28 11:43:30 lukem Exp $  */
 
 #ifdef HMAC_MD5
 #ifndef LINT
-static const char rcsid[] = "Header: /proj/cvs/isc/bind8/src/lib/dst/hmac_link.c,v 1.8 1999/10/15 21:30:07 vixie Exp";
+static const char rcsid[] = "Header: /proj/cvs/isc/bind8/src/lib/dst/hmac_link.c,v 1.9 2001/05/29 05:48:10 marka Exp";
 #endif
 /*
  * Portions Copyright (c) 1995-1998 by Trusted Information Systems, Inc.
@@ -105,7 +105,7 @@
        }
 
        if ((mode & SIG_MODE_UPDATE) && (data && len > 0))
-               MD5Update(ctx, (u_char *)data, len);
+               MD5Update(ctx, data, len);
 
        if (mode & SIG_MODE_FINAL) {
                if (signature == NULL || sig_len < MD5_LEN)
@@ -171,7 +171,7 @@
                MD5Update(ctx, key->hk_ipad, HMAC_LEN);
        }
        if ((mode & SIG_MODE_UPDATE) && (data && len > 0))
-               MD5Update(ctx, (u_char *)data, len);
+               MD5Update(ctx, data, len);
 
        if (mode & SIG_MODE_FINAL) {
                u_char digest[MD5_LEN];
@@ -231,7 +231,7 @@
        if (keylen > HMAC_LEN) {
                u_char tk[MD5_LEN];
                MD5Init(&ctx);
-               MD5Update(&ctx, (u_char *)key, keylen);
+               MD5Update(&ctx, key, keylen);
                MD5Final(tk, &ctx);
                memset((void *) &ctx, 0, sizeof(ctx));
                key = tk;
@@ -433,6 +433,8 @@
        u_char *buff;
        int i, n, size;
 
+       i = nothing;
+
        if (key == NULL || key->dk_alg != KEY_HMAC_MD5)
                return (0);
        size = (key->dk_key_size + 7) / 8; /* convert to bytes */



Home | Main Index | Thread Index | Old Index