vlm / asn1c

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

asn_decode() with the transfer syntax ATS_UNALIGNED_BASIC_PER and ATS_UNALIGNED_CANONICAL_PER is incorrectly decoding the OCTET STRING #463

Open samrajput1143 opened 1 year ago

samrajput1143 commented 1 year ago

Both asn_decode() and uper_decode_complete() are incorrectly decoding the OCTET string and giving the wrong result. These function are still returning decode_result.code =RC_OK and decode_result.consumed=8 (less than the actual size of buffer, 32)

samrajput1143 commented 1 year ago

actual output should look like image but I'm getting image

samrajput1143 commented 1 year ago

Below are the c structure image image

samrajput1143 commented 1 year ago

below is my code image

samrajput1143 commented 1 year ago

below is the asn definition image