mirror of
https://github.com/roytam1/UXP.git
synced 2026-05-26 13:58:49 +00:00
[NSS] Fix use of uninitialized length after failed PK11_SignWithMechanism/SymKey.
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -3113,7 +3113,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