rv = SEC_ASN1DecodeItem(arena, &p5_param,
rv = SEC_QuickDERDecodeItem(arena, &p5_param,
pbe_PK11AlgidToParam(SECAlgorithmID *algid,SECItem *mech){    CK_PBE_PARAMS *pbe_params = NULL;    SEC_PKCS5PBEParameter p5_param;    SECItem *salt = NULL;    SECOidTag algorithm = SECOID_GetAlgorithmTag(algid);    PRArenaPool *arena = NULL;    SECStatus rv = SECFailure;    int iv_len;        arena = PORT_NewArena(SEC_ASN1_DEFAULT_ARENA_SIZE);    if (arena == NULL) {	goto loser;    }    iv_len = PK11_GetIVLength(PK11_AlgtagToMechanism(algorithm));    if (iv_len < 0) {	goto loser;    }    if (sec_pkcs5_is_algorithm_v2_pkcs12_algorithm(algorithm)) {        rv = SEC_ASN1DecodeItem(arena, &p5_param,			 SEC_V2PKCS12PBEParameterTemplate, &algid->parameters);    } else {        rv = SEC_ASN1DecodeItem(arena,&p5_param,SEC_PKCS5PBEParameterTemplate, 						&algid->parameters);    }    if (rv != SECSuccess) {	goto loser;    }            salt = &p5_param.salt;    pbe_params = (CK_PBE_PARAMS *)PORT_ZAlloc(sizeof(CK_PBE_PARAMS)+						salt->len+iv_len);    if (pbe_params == NULL) {	goto loser;    }    /* get salt */    pbe_params->pSalt = ((CK_CHAR_PTR) pbe_params)+sizeof(CK_PBE_PARAMS);    if (iv_len) {	pbe_params->pInitVector = ((CK_CHAR_PTR) pbe_params)+					sizeof(CK_PBE_PARAMS)+salt->len;    }    PORT_Memcpy(pbe_params->pSalt, salt->data, salt->len);    pbe_params->ulSaltLen = (CK_ULONG) salt->len;    /* get iteration count */    pbe_params->ulIteration = (CK_ULONG) DER_GetInteger(&p5_param.iteration);    /* copy into the mechanism sec item */    mech->data = (unsigned char *)pbe_params;    mech->len = sizeof(*pbe_params);    if (arena) {	PORT_FreeArena(arena,PR_TRUE);    }    return SECSuccess;loser:    if (pbe_params) {	PORT_Free(pbe_params);    }    if (arena) {	PORT_FreeArena(arena,PR_TRUE);    }    return SECFailure;}