From e4dee3eb1f10e14dd63c7ed6e20d718c5f2d56a3 Mon Sep 17 00:00:00 2001 From: Miloslav Trmač Date: Thu, 25 Nov 2010 23:07:40 +0100 Subject: Fix buffer size computation when importing keys --- lib/ncrypto_nss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/ncrypto_nss.c b/lib/ncrypto_nss.c index b5bb753..d6ded4f 100644 --- a/lib/ncrypto_nss.c +++ b/lib/ncrypto_nss.c @@ -405,7 +405,7 @@ private_key_create (struct ncr_private_key **key, CK_KEY_TYPE type, } /* C_EncryptFinal is only available through this function. "Nice.". */ ss = PK11_DigestFinal (ctx, wrapped_item.data + wrapped_len, - &wrapped_item.len, wrapped_len); + &wrapped_item.len, wrapped_item.len - wrapped_len); PK11_DestroyContext (ctx, PR_TRUE); if (ss != SECSuccess) goto err_wrapped_item; -- cgit