From aaaa9173cf4bf6f1b96155e8128434cfca88e31f Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Tue, 20 Oct 2009 13:49:48 +0000 Subject: [PATCH] In k5_hmac_md5_hash_iov, initialize keyblock.contents so that we don't free it prior to initialization if krb5_hmac fails. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22953 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/krb/keyhash_provider/hmac_md5.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/crypto/krb/keyhash_provider/hmac_md5.c b/src/lib/crypto/krb/keyhash_provider/hmac_md5.c index 61c6d8c21..ad29d2849 100644 --- a/src/lib/crypto/krb/keyhash_provider/hmac_md5.c +++ b/src/lib/crypto/krb/keyhash_provider/hmac_md5.c @@ -103,6 +103,8 @@ k5_hmac_md5_hash_iov (krb5_key key, krb5_keyusage usage, char t[4]; size_t i; + keyblock.contents = NULL; + ds.length = key->keyblock.length; ds.data = malloc(ds.length); if (ds.data == NULL) -- 2.26.2