mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 15:27:32 +09:00
Update NSS to 3.32.1-RTM
This commit is contained in:
parent
f29876f120
commit
c91ef9012b
512 changed files with 83203 additions and 16839 deletions
|
|
@ -704,9 +704,8 @@ NSSBase64_DecodeBuffer(PLArenaPool *arenaOpt, SECItem *outItemOpt,
|
|||
{
|
||||
SECItem *out_item = NULL;
|
||||
PRUint32 max_out_len = 0;
|
||||
PRUint32 out_len;
|
||||
void *mark = NULL;
|
||||
unsigned char *dummy;
|
||||
unsigned char *dummy = NULL;
|
||||
|
||||
if ((outItemOpt != NULL && outItemOpt->data != NULL) || inLen == 0) {
|
||||
PORT_SetError(SEC_ERROR_INVALID_ARGS);
|
||||
|
|
@ -717,33 +716,35 @@ NSSBase64_DecodeBuffer(PLArenaPool *arenaOpt, SECItem *outItemOpt,
|
|||
mark = PORT_ArenaMark(arenaOpt);
|
||||
|
||||
max_out_len = PL_Base64MaxDecodedLength(inLen);
|
||||
if (max_out_len == 0) {
|
||||
goto loser;
|
||||
}
|
||||
out_item = SECITEM_AllocItem(arenaOpt, outItemOpt, max_out_len);
|
||||
if (out_item == NULL) {
|
||||
if (arenaOpt != NULL)
|
||||
PORT_ArenaRelease(arenaOpt, mark);
|
||||
return NULL;
|
||||
goto loser;
|
||||
}
|
||||
|
||||
dummy = PL_Base64DecodeBuffer(inStr, inLen, out_item->data,
|
||||
max_out_len, &out_len);
|
||||
max_out_len, &out_item->len);
|
||||
if (dummy == NULL) {
|
||||
if (arenaOpt != NULL) {
|
||||
PORT_ArenaRelease(arenaOpt, mark);
|
||||
if (outItemOpt != NULL) {
|
||||
outItemOpt->data = NULL;
|
||||
outItemOpt->len = 0;
|
||||
}
|
||||
} else {
|
||||
SECITEM_FreeItem(out_item,
|
||||
(outItemOpt == NULL) ? PR_TRUE : PR_FALSE);
|
||||
}
|
||||
return NULL;
|
||||
goto loser;
|
||||
}
|
||||
|
||||
if (arenaOpt != NULL)
|
||||
if (arenaOpt != NULL) {
|
||||
PORT_ArenaUnmark(arenaOpt, mark);
|
||||
out_item->len = out_len;
|
||||
}
|
||||
return out_item;
|
||||
|
||||
loser:
|
||||
if (arenaOpt != NULL) {
|
||||
PORT_ArenaRelease(arenaOpt, mark);
|
||||
if (outItemOpt != NULL) {
|
||||
outItemOpt->data = NULL;
|
||||
outItemOpt->len = 0;
|
||||
}
|
||||
} else if (dummy == NULL) {
|
||||
SECITEM_FreeItem(out_item, (PRBool)(outItemOpt == NULL));
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue