# HG changeset patch # User Kai Engert <kaie@kuix.de> # Date 1444934066 -7200 # Node ID 534aca7a5bcaabe39804d5eec8b94b711298cc29 # Parent f1a84b2a75affb8bde428ae9735f582f9644f0ae Bug 1202868, Windows bustage fix, variable declarations must go first. diff --git a/lib/util/secasn1d.c b/lib/util/secasn1d.c --- a/lib/util/secasn1d.c +++ b/lib/util/secasn1d.c @@ -1784,16 +1784,17 @@ sec_asn1d_next_substring (sec_asn1d_stat state->top->status = decodeError; return; } state->pending -= child_consumed; if (state->pending == 0) done = PR_TRUE; } else { + PRBool preallocatedString; PORT_Assert (state->indefinite); item = (SECItem *)(child->dest); /** * At this point, there's three states at play: * child: The element that was just parsed * state: The currently processed element @@ -1856,17 +1857,17 @@ sec_asn1d_next_substring (sec_asn1d_stat * between 'state' and 'parent' may go through several levels of * constructed encoding, so continue walking the ancestor chain until a * clear determination can be made. * * The variable preallocatedString is used to indicate Case #1/#3, * 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; + preallocatedString = PR_FALSE; sec_asn1d_state *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) { /* Case #5 - Either this is a top-level construct or it is part * of some other element (e.g. a SEQUENCE), in which case, a * new item should be allocated. */ break;