Commit 56867328 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

crypt32: Fix key buffer leak (Coverity).

parent 5ae2b885
......@@ -2553,6 +2553,7 @@ static BOOL CNG_ImportECCPubKey(CERT_PUBLIC_KEY_INFO *pubKeyInfo, BCRYPT_KEY_HAN
memcpy(ecckey + 1, pubKeyInfo->PublicKey.pbData + 1, pubKeyInfo->PublicKey.cbData - 1);
status = BCryptImportKeyPair(alg, NULL, BCRYPT_ECCPUBLIC_BLOB, key, (BYTE*)ecckey, ecckey_len, 0);
CryptMemFree(ecckey);
done:
if (alg) BCryptCloseAlgorithmProvider(alg, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment