Kaydet (Commit) 71c804a0 authored tarafından Caolán McNamara's avatar Caolán McNamara

pvs-studio: The 'store' variable is assigned values twice successively.

Change-Id: I532bf99935c2f4d3b58f666684013bc545791208
Reviewed-on: https://gerrit.libreoffice.org/62050
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst fc6dd83b
......@@ -735,14 +735,12 @@ uno::Reference< XCertificate > SecurityEnvironment_MSCryptImpl::createCertificat
}
uno::Reference< XCertificate > SecurityEnvironment_MSCryptImpl::createCertificateFromAscii( const OUString& asciiCertificate ) {
xmlChar* chCert ;
xmlSecSize certSize ;
OString oscert = OUStringToOString( asciiCertificate , RTL_TEXTENCODING_ASCII_US ) ;
chCert = xmlStrndup( reinterpret_cast<const xmlChar*>(oscert.getStr()), static_cast<int>(oscert.getLength()) ) ;
xmlChar* chCert = xmlStrndup( reinterpret_cast<const xmlChar*>(oscert.getStr()), static_cast<int>(oscert.getLength()) ) ;
certSize = xmlSecBase64Decode( chCert, chCert, xmlStrlen( chCert ) ) ;
xmlSecSize certSize = xmlSecBase64Decode( chCert, chCert, xmlStrlen( chCert ) ) ;
uno::Sequence< sal_Int8 > rawCert( certSize ) ;
for( xmlSecSize i = 0 ; i < certSize ; i ++ )
......@@ -757,9 +755,7 @@ uno::Reference< XCertificate > SecurityEnvironment_MSCryptImpl::createCertificat
static HCERTSTORE getCertStoreForIntermediatCerts(
const uno::Sequence< uno::Reference< css::security::XCertificate > >& seqCerts)
{
HCERTSTORE store = nullptr;
store = CertOpenStore(
CERT_STORE_PROV_MEMORY, 0, NULL, 0, nullptr);
HCERTSTORE store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, NULL, 0, nullptr);
if (store == nullptr)
return nullptr;
......
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