From: Paul Park Date: Tue, 8 Aug 1995 21:58:45 +0000 (+0000) Subject: Use correct length to malloc() in encrypt_key_data() X-Git-Tag: krb5-1.0-beta6~1367 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=62ccc284a4fe41d6dabf3bc51c46ee6e1e9c03d9;p=krb5.git Use correct length to malloc() in encrypt_key_data() git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6459 dc483132-0cff-0310-8789-dd5450dbe970 --- 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;