From 62ccc284a4fe41d6dabf3bc51c46ee6e1e9c03d9 Mon Sep 17 00:00:00 2001 From: Paul Park Date: Tue, 8 Aug 1995 21:58:45 +0000 Subject: [PATCH] Use correct length to malloc() in encrypt_key_data() git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6459 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/kdb/encrypt_key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/kdb/encrypt_key.c b/src/lib/kdb/encrypt_key.c index cc8cf0be8..d22d73d22 100644 --- a/src/lib/kdb/encrypt_key.c +++ b/src/lib/kdb/encrypt_key.c @@ -73,7 +73,7 @@ krb5_dbekd_encrypt_key_data(context, eblock, keyblock, keysalt, keyver,key_data) memcpy((char *)tmp.contents, (const char *)keyblock->contents, tmp.length); key_data->key_data_contents[0] = ptr = (krb5_octet *)malloc( - key_data->key_data_length[0] - 2); + key_data->key_data_length[0]); if (key_data->key_data_contents[0] == NULL) { krb5_xfree(tmp.contents); return ENOMEM; -- 2.26.2