summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2003-06-20 23:35:51 +0000
committerwtc%netscape.com <devnull@localhost>2003-06-20 23:35:51 +0000
commit60ca1d55210dc1f035ae134cee43fa57e7f3b258 (patch)
treed67d92d9ee674720bb649e62cf049fc705439e6b
parent4f39589e389b7d5342411b4a8c94aee6e591aa9f (diff)
downloadnss-hg-60ca1d55210dc1f035ae134cee43fa57e7f3b258.tar.gz
Back ported rev. 1.26 (the fix for bug 174885) to the NSS_3_4_BRANCH.
-rw-r--r--security/nss/lib/util/secasn1d.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/security/nss/lib/util/secasn1d.c b/security/nss/lib/util/secasn1d.c
index 4bb0e7d3f..bb40a2b75 100644
--- a/security/nss/lib/util/secasn1d.c
+++ b/security/nss/lib/util/secasn1d.c
@@ -916,10 +916,9 @@ sec_asn1d_prepare_for_contents (sec_asn1d_state *state)
} else {
/*
* A group of zero; we are done.
- * XXX Should we store a NULL here? Or set state to
- * afterGroup and let that code do it?
+ * Set state to afterGroup and let that code plant the NULL.
*/
- state->place = afterEndOfContents;
+ state->place = afterGroup;
}
return;
}
@@ -1914,7 +1913,8 @@ sec_asn1d_concat_group (sec_asn1d_state *state)
PORT_Assert (state->place == afterGroup);
placep = (const void***)state->dest;
- if (state->subitems_head != NULL) {
+ PORT_Assert(state->subitems_head == NULL || placep != NULL);
+ if (placep != NULL) {
struct subitem *item;
const void **group;
int count;
@@ -1934,7 +1934,6 @@ sec_asn1d_concat_group (sec_asn1d_state *state)
return;
}
- PORT_Assert (placep != NULL);
*placep = group;
item = state->subitems_head;
@@ -1950,8 +1949,6 @@ sec_asn1d_concat_group (sec_asn1d_state *state)
* a memory leak (it is just temporarily left dangling).
*/
state->subitems_head = state->subitems_tail = NULL;
- } else if (placep != NULL) {
- *placep = NULL;
}
state->place = afterEndOfContents;