the newly created sequence is added to the internal list but the free'd immediately which gives a bad pointer reference.
This is the code:
procedure TIdASN1Encoder.StartSequence(aClass: TIdASN1IdentifierClass; iTag: Integer);
var
oSequence : TIdASN1Sequence;
begin
oSequence := TIdASN1Sequence.create;
try
oSequence.IdClass := aClass;
oSequence.Tag := iTag;
oSequence.Contents := '';
FSequences.add(oSequence);
finally
**//oSequence.Free; I commented out this line and everything works for me.**
end;
end;
There is an issue in the
IdASN1Coder
unit. In this method:procedure TIdASN1Encoder.StartSequence(aClass: TIdASN1IdentifierClass; iTag: Integer);
the newly created sequence is added to the internal list but the free'd immediately which gives a bad pointer reference.
This is the code: