state->endofcontents = state->child->endofcontents;
sec_asn1d_absorb_child (sec_asn1d_state *state){    /*     * There is absolutely supposed to be a child there.     */    PORT_Assert (state->child != NULL);    /*     * Inherit the missing status of our child, and do the ugly     * backing-up if necessary.     * (Only IMPLICIT or POINTER should encounter such; all other cases     * should have confirmed a tag *before* pushing a child.)     */    state->missing = state->child->missing;    if (state->missing) {	PORT_Assert (state->place == afterImplicit		     || state->place == afterPointer);	state->found_tag_number = state->child->found_tag_number;	state->found_tag_modifiers = state->child->found_tag_modifiers;    }    /*     * Add in number of bytes consumed by child.     * (Only EXPLICIT should have already consumed bytes itself.)     */    PORT_Assert (state->place == afterExplicit || state->consumed == 0);    state->consumed += state->child->consumed;    /*     * Subtract from bytes pending; this only applies to a definite-length     * EXPLICIT field.     */    if (state->pending) {	PORT_Assert (!state->indefinite);	PORT_Assert (state->place == afterExplicit);	/*	 * If we had a definite-length explicit, then what the child	 * consumed should be what was left pending.	 */	if (state->pending != state->child->consumed) {	    if (state->pending < state->child->consumed) {		PORT_SetError (SEC_ERROR_BAD_DER);		state->top->status = decodeError;		return;	    }	    /*	     * Okay, this is a hack.  It *should* be an error whether	     * pending is too big or too small, but it turns out that	     * we had a bug in our *old* DER encoder that ended up	     * counting an explicit header twice in the case where	     * the underlying type was an ANY.  So, because we cannot	     * prevent receiving these (our own certificate server can	     * send them to us), we need to be lenient and accept them.	     * To do so, we need to pretend as if we read all of the	     * bytes that the header said we would find, even though	     * we actually came up short.	     */	    state->consumed += (state->pending - state->child->consumed);	}	state->pending = 0;    }    /*     * Indicate that we are done with child.     */    state->child->consumed = 0;    /*     * And move on to final state.     * (Technically everybody could move to afterEndOfContents except     * for an indefinite-length EXPLICIT; for simplicity though we assert     * that but let the end-of-contents code do the real determination.)     */    PORT_Assert (state->place == afterExplicit || (! state->indefinite));    state->place = beforeEndOfContents;}