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

Unified Diff: nss/lib/util/secasn1d.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/secasn1d.c
diff --git a/nss/lib/util/secasn1d.c b/nss/lib/util/secasn1d.c
index d85597ba5892838411b381f3e1b24f70120f798a..7a5bcfd03a161c62c0c52716db164ae2db859aad 100644
--- a/nss/lib/util/secasn1d.c
+++ b/nss/lib/util/secasn1d.c
@@ -985,6 +985,7 @@ sec_asn1d_prepare_for_contents (sec_asn1d_state *state)
SECItem *item;
PLArenaPool *poolp;
unsigned long alloc_len;
+ sec_asn1d_state *parent;
#ifdef DEBUG_ASN1D_STATES
{
@@ -1020,7 +1021,7 @@ sec_asn1d_prepare_for_contents (sec_asn1d_state *state)
/* Determine the maximum length available for this element by finding the
* first definite length ancestor, if any. */
- sec_asn1d_state *parent = sec_asn1d_get_enclosing_construct(state);
+ parent = sec_asn1d_get_enclosing_construct(state);
while (parent && parent->indefinite) {
parent = sec_asn1d_get_enclosing_construct(parent);
}
@@ -1789,6 +1790,8 @@ sec_asn1d_next_substring (sec_asn1d_state *state)
if (state->pending == 0)
done = PR_TRUE;
} else {
+ PRBool preallocatedString;
+ sec_asn1d_state *temp_state;
PORT_Assert (state->indefinite);
item = (SECItem *)(child->dest);
@@ -1861,8 +1864,8 @@ sec_asn1d_next_substring (sec_asn1d_state *state)
* indicating an in-place copy has already occurred, and Cases #2, #4,
* and #5 all have the same behaviour of adding a new substring.
*/
- PRBool preallocatedString = PR_FALSE;
- sec_asn1d_state *temp_state = state;
+ preallocatedString = PR_FALSE;
+ temp_state = state;
while (temp_state && item == temp_state->dest && temp_state->indefinite) {
sec_asn1d_state *parent = sec_asn1d_get_enclosing_construct(temp_state);
if (!parent || parent->underlying_kind != temp_state->underlying_kind) {
« nss/lib/util/pkcs11n.h ('K') | « nss/lib/util/quickder.c ('k') | nss/lib/util/secoid.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698