Comments (8)
Hi @johvik,
Thanks for reporting this problem, could you also provide also xer
or aper
files for the example asn1 definition and all commands you need to execute to reproduce this segfault.
Do you have plans to work on a fix?
from asn1c.
Let me second this request. @johvik please provide a xer
file that demonstrates the problem.
from asn1c.
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 aper_put_nsnnwn
from vlm#125. @velichkov I'm afraid I do not have time to make a permanent fix :/
from asn1c.
@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.
from asn1c.
Do you mean this?
<ChoiceExtended1>
<b><one/></b>
</ChoiceExtended1>
from asn1c.
Yes! Thank you!
from asn1c.
I have a preliminary solution, will push later.
from asn1c.
@johvik thank you - you've provided great info that both unambiguously described the bug, and pointed out a likely solution.
from asn1c.
Related Issues (20)
- Type with (size) constraint HOT 4
- Join LFC? HOT 1
- Output from encoding an OpenType extension is wrong (APER) HOT 5
- Help debugging "Segmentation fault (core dumped)" HOT 8
- Problem compiling. HOT 4
- Question about v1.0.0. HOT 1
- Problem compiling: contains no objects HOT 4
- APER encoding failed on a 32-bit machine HOT 8
- INTEGER_decode_aper decode failed for 3GPP 38.473 f1ap ASN HOT 6
- Using fuzzing with asn1c HOT 1
- safe_fwrite: warning: 'ret' may be used uninitialized HOT 4
- Several defects detected by coverity HOT 1
- (token "::="): syntax error and (token "}"): syntax error HOT 4
- ImportError: undefined symbols in Shared Library HOT 3
- Circular Reference in Generated C Code for NodeOffsetPointXY structure HOT 6
- Typedef error and not included code HOT 6
- aper_support.c error parsing BMPString HOT 5
- parse parameterized Type failed HOT 7
- The new version per_decode NGAP protocol NGSetupResopnse error HOT 30
- How to encode a buffer into der we don't know the size of the buffer HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asn1c.