core: Fix pointer corruption with d2i_X509

The `d2i_X509` function manipulates the passed pointer on success. This
resulted in a corrupted `rdpCertBlob` struct, crashing later on free.
This commit is contained in:
Martin Fleisz 2023-02-14 09:16:02 +01:00 committed by akallabeth
parent ff3c7c82ee
commit 5f9db5a89c
1 changed files with 2 additions and 1 deletions

View File

@ -285,7 +285,8 @@ static BOOL is_rsa_key(const X509* x509)
static BOOL blob_is_rsa_key(const rdpCertBlob* cert)
{
X509* x509 = d2i_X509(NULL, &cert->data, cert->length);
const BYTE* inData = cert->data;
X509* x509 = d2i_X509(NULL, &inData, cert->length);
if (!x509)
return FALSE;