Closed stevemit closed 1 year ago
mp_init()
is not the mp_init()
you're assuming, but
which in turn is MPI provider specific and for LTM declared here:
This init()
then calls init_mpi()
which allocates the struct you're expecting to be corrupted.
This references the current state of the develop branch and not the latest release, but the mechanism is still the same.
Please re-open if this doesn't fix this for you.
Thanks for the quick response.
Prerequisites
LTC_ARGCHK 'ltc_mp.name != NULL' failure ...
). c.f. Ch. "Math Descriptors" of the developer manual.Description
Inspecting
der_decode_sequence_flexi.c
at line 152, when parsing an INTEGER we haveThe function
mp_init
writes to anmp_int
structure, butl->data
is just avoid*
. This trashes the fields followingdata
in theltc_asn1_list
struct.Steps to Reproduce
Code inspection.
Version
1.18.2
Additional Information
A fix would be to point
data
to an allocatedmp_int
buffer, and then to free it inder_sequence_free.c
.