Nikolay Sivov : crypt32: Fix key buffer leak (Coverity).

Alexandre Julliard julliard at winehq.org
Wed Jul 11 15:53:50 CDT 2018


Module: wine
Branch: master
Commit: 568673282c9d727de7f6cb3ca2423eb8579aa1fe
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=568673282c9d727de7f6cb3ca2423eb8579aa1fe

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Wed Jul 11 08:42:01 2018 +0300

crypt32: Fix key buffer leak (Coverity).

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/crypt32/cert.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c
index 1667b42..4a7a1fe 100644
--- a/dlls/crypt32/cert.c
+++ b/dlls/crypt32/cert.c
@@ -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);




More information about the wine-cvs mailing list