mirror of
https://github.com/roytam1/basilisk55.git
synced 2026-05-26 15:02:46 +00:00
import from UXP: [NSS] Fix use of uninitialized length after failed PK11_SignWithMechanism/SymKey. (2a26d950)
This commit is contained in:
@@ -840,11 +840,11 @@ PK11_SignWithMechanism(SECKEYPrivateKey *key, CK_MECHANISM_TYPE mechanism,
|
||||
if (haslock)
|
||||
PK11_ExitSlotMonitor(slot);
|
||||
pk11_CloseSession(slot, session, owner);
|
||||
sig->len = len;
|
||||
if (crv != CKR_OK) {
|
||||
PORT_SetError(PK11_MapError(crv));
|
||||
return SECFailure;
|
||||
}
|
||||
sig->len = len;
|
||||
return SECSuccess;
|
||||
}
|
||||
|
||||
@@ -888,11 +888,11 @@ PK11_SignWithSymKey(PK11SymKey *symKey, CK_MECHANISM_TYPE mechanism,
|
||||
if (haslock)
|
||||
PK11_ExitSlotMonitor(slot);
|
||||
pk11_CloseSession(slot, session, owner);
|
||||
sig->len = len;
|
||||
if (crv != CKR_OK) {
|
||||
PORT_SetError(PK11_MapError(crv));
|
||||
return SECFailure;
|
||||
}
|
||||
sig->len = len;
|
||||
return SECSuccess;
|
||||
}
|
||||
|
||||
|
||||
@@ -3111,7 +3111,7 @@ NSC_SignFinal(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pSignature,
|
||||
{
|
||||
SFTKSession *session;
|
||||
SFTKSessionContext *context;
|
||||
unsigned int outlen;
|
||||
unsigned int outlen = 0;
|
||||
unsigned int maxoutlen = *pulSignatureLen;
|
||||
CK_RV crv;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user