Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: nss/lib/util/quickder.c

Issue 1504923011: Update NSS to 3.21 RTM and NSPR to 4.11 RTM (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/nss
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: nss/lib/util/quickder.c
diff --git a/nss/lib/util/quickder.c b/nss/lib/util/quickder.c
index f9776bb9d581c8e816204651545b26fa2aff3ef8..fe72b293a9eaff14b5001c3c29717830910ce4e3 100644
--- a/nss/lib/util/quickder.c
+++ b/nss/lib/util/quickder.c
@@ -146,7 +146,7 @@ static SECStatus GetItem(SECItem* src, SECItem* dest, PRBool includeTag)
PORT_SetError(SEC_ERROR_BAD_DER);
return SECFailure;
}
- src->len -= (dest->data - src->data) + dest->len;
+ src->len -= (int)(dest->data - src->data) + dest->len;
src->data = dest->data + dest->len;
return SECSuccess;
}
@@ -270,13 +270,9 @@ static SECStatus MatchComponentType(const SEC_ASN1Template* templateEntry,
if ( (tag & SEC_ASN1_CLASS_MASK) !=
(((unsigned char)kind) & SEC_ASN1_CLASS_MASK) )
{
-#ifdef DEBUG
/* this is only to help debugging of the decoder in case of problems */
- unsigned char tagclass = tag & SEC_ASN1_CLASS_MASK;
- unsigned char expectedclass = (unsigned char)kind & SEC_ASN1_CLASS_MASK;
- tagclass = tagclass;
- expectedclass = expectedclass;
-#endif
+ /* unsigned char tagclass = tag & SEC_ASN1_CLASS_MASK; */
+ /* unsigned char expectedclass = (unsigned char)kind & SEC_ASN1_CLASS_MASK; */
*match = PR_FALSE;
return SECSuccess;
}
@@ -657,13 +653,12 @@ static SECStatus DecodeItem(void* dest,
{
SECStatus rv = SECSuccess;
SECItem temp;
- SECItem mark;
+ SECItem mark = {siBuffer, NULL, 0};
PRBool pop = PR_FALSE;
PRBool decode = PR_TRUE;
PRBool save = PR_FALSE;
unsigned long kind;
PRBool match = PR_TRUE;
- PRBool optional = PR_FALSE;
PR_ASSERT(src && dest && templateEntry && arena);
#if 0
@@ -678,7 +673,6 @@ static SECStatus DecodeItem(void* dest,
{
/* do the template validation */
kind = templateEntry->kind;
- optional = (0 != (kind & SEC_ASN1_OPTIONAL));
if (!kind)
{
PORT_SetError(SEC_ERROR_BAD_TEMPLATE);
« nss/lib/util/pkcs11n.h ('K') | « nss/lib/util/pkcs11t.h ('k') | nss/lib/util/secasn1d.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698