Call the ASN1_OP_D2I_PRE callback after ASN1_item_ex_new().
authorjsing <jsing@openbsd.org>
Thu, 12 May 2022 20:06:46 +0000 (20:06 +0000)
committerjsing <jsing@openbsd.org>
Thu, 12 May 2022 20:06:46 +0000 (20:06 +0000)
commit2960f0cd6c4b256952c3f9c8db9fde74fc28e7f8
tree101d3ce0979ae0646f1f12662a8e5ca7e131b59a
parent592c92088c5df56db9c3a23ff46e6460279c4f4c
Call the ASN1_OP_D2I_PRE callback after ASN1_item_ex_new().

In asn1_item_ex_d2i_choice(), only call the ASN1_OP_D2I_PRE callback after
allocation has occurred via ASN1_item_ex_new(). This matches the sequence
handling code and the documentation.

Discussed with tb@
lib/libcrypto/asn1/tasn_dec.c