diff options
| author | Miloslav Trmač <mitr@redhat.com> | 2010-11-25 23:07:40 +0100 |
|---|---|---|
| committer | Miloslav Trmač <mitr@redhat.com> | 2010-11-25 23:08:50 +0100 |
| commit | e4dee3eb1f10e14dd63c7ed6e20d718c5f2d56a3 (patch) | |
| tree | a7a68213c5fbc965ed91ccde5f5b620ad17e40f3 | |
| parent | b131c15c65257c06847c5e667e7699035746362f (diff) | |
| download | ncrypto-e4dee3eb1f10e14dd63c7ed6e20d718c5f2d56a3.tar.gz ncrypto-e4dee3eb1f10e14dd63c7ed6e20d718c5f2d56a3.tar.xz ncrypto-e4dee3eb1f10e14dd63c7ed6e20d718c5f2d56a3.zip | |
Fix buffer size computation when importing keys
| -rw-r--r-- | lib/ncrypto_nss.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |
