This is our old Q&A Site. Please post any new questions and answers at

Hi, at the time of decoding some sequence (the function "dissect_per_sequence" is called), we are getting the error: "too long integer(per_normally_small_nonnegative_whole_number)". The IEs with "ASN1_EXTENSION_ROOT,ASN1_OPTIONAL and ASN1_NOT_OPTIONAL" are dissecting properly. after those dissection the error is coming.

The sequence has extension marker (the ellipses or ...) in PROP_IEs.asn file. the dissection of IEs before (ellipses or ...) is fine. after that Malformed packet with "too long integer(per_normally_small_nonnegative_whole_number)" is shown.

snapshot of PROP_IEs.asn:

pD-BearerDataList              PD-BearerDataList           OPTIONAL,
pD-FirstUeMeasurementDataItems PD-UeMeasurementDataListing OPTIONAL,
pD-LastUeMeasurementDataItems  PD-UeMeasurementDataListing OPTIONAL,
measDataNotAvailable           MeasDataNotAvailable        OPTIONAL,
rrcEstablishmentReason         RrcEstablishmentCause       OPTIONAL,

snapshot of packet-s1ap.c

{ &hf_s1ap_pD_BearerDataList, ASN1_EXTENSION_ROOT, ASN1_OPTIONAL, dissect_s1ap_PCMD_BearerDataList },
{ &hf_s1ap_pD_FirstUeMeasurementDataItems, ASN1_EXTENSION_ROOT, ASN1_OPTIONAL, dissect_s1ap_UeMeasurementDataListing },
{ &hf_s1ap_pD-LastUeMeasurementDataItems, ASN1_EXTENSION_ROOT, ASN1_OPTIONAL, dissect_s1ap_UeMeasurementDataListing },
{ &hf_s1ap_measDataNotAvailable, ASN1_NOT_EXTENSION_ROOT, ASN1_OPTIONAL, dissect_s1ap_MeasDataNotPresent },
{ &hf_s1ap_rrcEstablishmentReason, ASN1_NOT_EXTENSION_ROOT, ASN1_OPTIONAL, dissect_s1ap_RrcEstablishmentCause },

So my question is regarding dissection of IEs/Components after extension marker (Ellipses or ...). How dissection happens? how to calculate number of extensions? why this error is coming? Any help specially from developer are welcome.

asked 06 Apr '17, 03:05

Abhisek's gravatar image

accept rate: 0%

edited 06 Apr '17, 03:22

grahamb's gravatar image

grahamb ♦

According to my understanding of packet-per.c, the dissect_per_sequence function dissected in two stage. Stage 1: components before extension marker.

  1. first calculate components with NOT(ASN1_NOT_EXTENSION_ROOT) and ASN1_OPTIONAL,
  2. then check optional field flag for each components calculated earlier step and make an arrary of bits(0 or 1 depends on presence of optional field flag),
  3. then call dissector function for components whose bit value is 1 in the array mentioned above.

Upto this part is fine. the dissection is fine with respect to sequence. Stage 2:Components after extension marker.

  1. dissect_per_normally_small_nonnegative_whole_number is called. and here my dissection is getting failed with error of Malformed packet and error message "too long integer(per_normally_small_nonnegative_whole_number)".

I don't know dissection part after that. Is any developer there, who can help me out.

(07 Apr '17, 04:49) Abhisek
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 06 Apr '17, 03:05

question was seen: 754 times

last updated: 07 Apr '17, 05:52

p​o​w​e​r​e​d by O​S​Q​A