-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
APER segfault #56
Comments
Hi @johvik, Thanks for reporting this problem, could you also provide also Do you have plans to work on a fix? |
Let me second this request. @johvik please provide a |
Here is a sample that reproduces the issue: #include <ChoiceExtended1.h>
#include <asn_application.h>
int
main()
{
ChoiceExtended1_t c;
memset(&c, 0, sizeof(c));
c.present = ChoiceExtended1_PR_b;
c.choice.b = Enum_one;
uint8_t buffer[500];
asn_encode_to_buffer(NULL,
ATS_ALIGNED_BASIC_PER,
&asn_DEF_ChoiceExtended1,
&c,
&buffer,
sizeof(buffer));
} As a temporary workaround I'm using |
@johvik thank you for the code example. But it would really help if you could provide XER-encoded data file for the ASN.1 that causes this APER problem. |
Do you mean this?
|
Yes! Thank you! |
I have a preliminary solution, will push later. |
@johvik thank you - you've provided great info that both unambiguously described the bug, and pointed out a likely solution. |
When using APER in a CHOICE it segfaults on this line (ct may be NULL):
asn1c/skeletons/constr_CHOICE.c
Line 1169 in a29f447
For example when encoding ChoiceExtended1 in this asn definition:
The text was updated successfully, but these errors were encountered: