Kaydet (Commit) cbe8883b authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud Kaydeden (comit) Andras Timar

coverity#982591 Dereference after null check

Change-Id: I8651ecb0287d686da3e1ca6a6e46549abe3e0c38
Reviewed-on: https://gerrit.libreoffice.org/2225Reviewed-by: 's avatarAndras Timar <atimar@suse.com>
Tested-by: 's avatarAndras Timar <atimar@suse.com>
üst e681622f
......@@ -509,17 +509,20 @@ SecurityEnvironment_NssImpl::getPersonalCertificates() throw( SecurityException
}
priKeyList = PK11_ListPrivateKeysInSlot(slot) ;
if( priKeyList != NULL ) {
if( priKeyList != NULL )
{
for( curPri = PRIVKEY_LIST_HEAD( priKeyList );
!PRIVKEY_LIST_END( curPri, priKeyList ) && curPri != NULL ;
curPri = PRIVKEY_LIST_NEXT( curPri ) ) {
curPri = PRIVKEY_LIST_NEXT( curPri ) )
{
xcert = NssPrivKeyToXCert( curPri->key ) ;
if( xcert != NULL )
certsList.push_back( xcert ) ;
}
SECKEY_DestroyPrivateKeyList( priKeyList ) ;
}
SECKEY_DestroyPrivateKeyList( priKeyList ) ;
}
//secondly, we try to find certificate from registered private keys.
......
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