1
0
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:
Moonchild
2026-05-25 07:27:51 +02:00
committed by roytam1
parent c144b4f403
commit 2a26d9508b
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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;
}
+1 -1
View File
@@ -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;