mouse07410 / asn1c

The ASN.1 Compiler
http://lionet.info/asn1c/
BSD 2-Clause "Simplified" License
101 stars 73 forks source link

Typedef error and not included code #190

Closed KIN92 closed 6 months ago

KIN92 commented 6 months ago

Hello, I was working on the H323 decoder, some errors occurred while working, they have all been resolved, but I think you should take a look.

OCTET_STRING_aper.c contains commented out code that causes the parser to crash on certain messages. When turned on it works correctly. I would like to know why it is commented out and whether its inclusion in any cases can lead to incorrect behavior?

There is also incorrect nesting of structures, which leads to errors on all compilers. I will attach an archive with a brief visual description. Thank you!

https://transfiles.ru/ov6ij

mouse07410 commented 6 months ago

OCTET_STRING_aper.c contains commented out code that causes the parser to crash on certain messages

Would you mind being more specific? I assume it's about https://github.com/mouse07410/asn1c/blob/940dd5fa9f3917913fd487b13dfddfacd0ded06e/skeletons/OCTET_STRING_aper.c#L75 ? Or did you uncomment something else?

KIN92 commented 6 months ago

That's right, just this piece of code, nothing else

mouse07410 commented 6 months ago

Thank you - uncommented in the current default (vlm_master).

shuimoshusheng commented 3 months ago

@KIN92 Could you please print out the cval->range_bits value? Is it a multiple of 8?

mouse07410 commented 3 months ago

OK, @KIN92 don't bother. I found the problem in your patch, reverted it, and re-implemented according to the standard. Final correction went in today.

@shuimoshusheng please confirm that the current vlm_master works correctly for you.

@v0-e please take a look, if you can.

shuimoshusheng commented 3 months ago

OK, @KIN92 don't bother. I found the problem in your patch, reverted it, and re-implemented according to the standard. Final correction went in today.

@shuimoshusheng please confirm that the current vlm_master works correctly for you.

@v0-e please take a look, if you can.

I tested the current version vlm_master and found that the PrintableString type is properly encoded and decoded. Thank you!!!