Git Product home page Git Product logo

Comments (8)

velichkov avatar velichkov commented on September 17, 2024

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.

mouse07410 avatar mouse07410 commented on September 17, 2024

Let me second this request. @johvik please provide a xer file that demonstrates the problem.

from asn1c.

johvik avatar johvik commented on September 17, 2024

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.

mouse07410 avatar mouse07410 commented on September 17, 2024

@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.

johvik avatar johvik commented on September 17, 2024

Do you mean this?

<ChoiceExtended1>
    <b><one/></b>
</ChoiceExtended1>

from asn1c.

mouse07410 avatar mouse07410 commented on September 17, 2024

Yes! Thank you!

from asn1c.

mouse07410 avatar mouse07410 commented on September 17, 2024

I have a preliminary solution, will push later.

from asn1c.

mouse07410 avatar mouse07410 commented on September 17, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.