Skip to content
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

large msg uper_decoder return RC_FAIL!!!!!! How to correct uper decode large msg? #446

Open
Aaaazibi opened this issue Jan 14, 2022 · 2 comments

Comments

@Aaaazibi
Copy link

Aaaazibi commented Jan 14, 2022

MessageFrame_t *msgFrame = NULL;
asn_dec_rval_t rval; /* Decoder return value */
rval = asn_decode(0, ATS_UNALIGNED_BASIC_PER, &asn_DEF_MessageFrame, (void **)&msgFrame, chbuf, eSize);

Need Help!!
Uper decoder returns an error when attempting to decode more than 4000bytes using uper.
Does the uper code have a length limit? OR Asn1c does not decode long codes?

(gdb) bt
#0 uper_decode (opt_codec_ctx=0x0, td=0x68bce0 <asn_DEF_MessageFrame>, sptr=0x7fffffffde30, buffer=0x6ab200, size=5020,
skip_bits=0, unused_bits=0) at per_decoder.c:66
#1 0x000000000043dcef in uper_decode_complete (opt_codec_ctx=0x0, td=0x68bce0 <asn_DEF_MessageFrame>, sptr=0x7fffffffde30,
buffer=0x6ab200, size=5020) at per_decoder.c:17
#2 0x0000000000403e34 in asn_decode (opt_codec_ctx=0x0, syntax=ATS_UNALIGNED_BASIC_PER, td=0x68bce0 <asn_DEF_MessageFrame>,
sptr=0x7fffffffde30, buffer=0x6ab200, size=5020) at asn_application.c:432
#3 0x000000000044974e in main () at test_decode.c:78

@Aaaazibi Aaaazibi changed the title large file uper_decoder return RC_FAIL!!!!!! How to correct uper decode large files? large msg uper_decoder return RC_FAIL!!!!!! How to correct uper decode large msg? Jan 14, 2022
@Aaaazibi
Copy link
Author

constr_SET_OF.c

 if(rv.consumed == 0 && nelems > 200)
/* Protect from SET OF NULL compression bombs. */
``

This limits the size to 200. If your list is larger than 200, you need to change it, but it's not sure if it will have any other effects.

@Aaaazibi Aaaazibi reopened this Jan 17, 2022
@Nasir-Ahmed2
Copy link

Nasir-Ahmed2 commented Sep 5, 2023

@Aaaazibi We also facing same issue, do have any patch or fix provided for this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants