зеркало из https://github.com/mozilla/gecko-dev.git
Duh. Don't try to get a reference to the slot until we know that it's not NULL.
This commit is contained in:
Родитель
61a9487ec2
Коммит
3c07e958d1
|
@ -2945,7 +2945,7 @@ PK11_VerifyRecover(SECKEYPublicKey *key,
|
|||
SECStatus
|
||||
PK11_Verify(SECKEYPublicKey *key, SECItem *sig, SECItem *hash, void *wincx)
|
||||
{
|
||||
PK11SlotInfo *slot = PK11_ReferenceSlot(key->pkcs11Slot);
|
||||
PK11SlotInfo *slot = key->pkcs11Slot;
|
||||
CK_OBJECT_HANDLE id = key->pkcs11ID;
|
||||
CK_MECHANISM mech = {0, NULL, 0 };
|
||||
PRBool owner = PR_TRUE;
|
||||
|
@ -2963,6 +2963,8 @@ PK11_Verify(SECKEYPublicKey *key, SECItem *sig, SECItem *hash, void *wincx)
|
|||
}
|
||||
id = PK11_ImportPublicKey(slot,key,PR_FALSE);
|
||||
|
||||
} else {
|
||||
PK11_ReferenceSlot(slot);
|
||||
}
|
||||
|
||||
session = pk11_GetNewSession(slot,&owner);
|
||||
|
|
Загрузка…
Ссылка в новой задаче