Juan Lang : crypt32: Fail earlier if CryptExportPublicKeyInfo fails.
Alexandre Julliard
julliard at winehq.org
Thu May 31 13:30:40 CDT 2012
Module: wine
Branch: master
Commit: da53cfc8bb15813fc6870d82aac059d50b95ccac
URL: http://source.winehq.org/git/wine.git/?a=commit;h=da53cfc8bb15813fc6870d82aac059d50b95ccac
Author: Juan Lang <juan.lang at gmail.com>
Date: Fri May 18 15:29:03 2012 -0700
crypt32: Fail earlier if CryptExportPublicKeyInfo fails.
---
dlls/crypt32/cert.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c
index be7d07c..2d6697c 100644
--- a/dlls/crypt32/cert.c
+++ b/dlls/crypt32/cert.c
@@ -3202,8 +3202,10 @@ PCCERT_CONTEXT WINAPI CertCreateSelfSignCertificate(HCRYPTPROV_OR_NCRYPT_KEY_HAN
}
}
- CryptExportPublicKeyInfo(hProv, dwKeySpec, X509_ASN_ENCODING, NULL,
+ ret = CryptExportPublicKeyInfo(hProv, dwKeySpec, X509_ASN_ENCODING, NULL,
&pubKeySize);
+ if (!ret)
+ goto end;
pubKey = CryptMemAlloc(pubKeySize);
if (pubKey)
{
@@ -3237,6 +3239,7 @@ PCCERT_CONTEXT WINAPI CertCreateSelfSignCertificate(HCRYPTPROV_OR_NCRYPT_KEY_HAN
}
CryptMemFree(pubKey);
}
+end:
if (releaseContext)
CryptReleaseContext(hProv, 0);
return context;
More information about the wine-cvs
mailing list