From: Ken Hornstein Date: Thu, 14 Nov 2002 15:48:36 +0000 (+0000) Subject: Wrong size for memset()s in combine_keys() X-Git-Tag: krb5-1.3-alpha1~274 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=66a8439e84c56c3a12545b83ac9cd96d2e29975b;p=krb5.git Wrong size for memset()s in combine_keys() The wrong size was used in the final memset()'s of various combine_key temporary variables. Pointed out by Ken Renard. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14997 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/crypto/combine_keys.c b/src/lib/crypto/combine_keys.c index 3bf4c2b2d..6466a95f3 100644 --- a/src/lib/crypto/combine_keys.c +++ b/src/lib/crypto/combine_keys.c @@ -242,10 +242,10 @@ krb5_error_code krb5int_c_combine_keys ret = 0; cleanup: - memset(r1, 0, keylength); - memset(r2, 0, keylength); + memset(r1, 0, keybytes); + memset(r2, 0, keybytes); memset(rnd, 0, keybytes); - memset(combined, 0, keylength * 2); + memset(combined, 0, keybytes * 2); memset(output, 0, keylength); free(r1);