Commit 3bcd4575 authored by Gábor Szalai's avatar Gábor Szalai
Browse files

Bug 568518 Raw decoder correction

The RAW decoder incorrectly decodes the set with a record of type field if:
- The record of field has a variant:  REPEATABLE(yes)
- It is a "catch all unknonw IE" list

The problem is that the "catch all unknonw IE" list field can consume all IEs

Solution:
If the record/set of field of the set has variant "REPEATABLE(yes)"
decode 1 element of the field at a time.

Change-Id: I274015ec7fe8194438a9a8d6e7b995bcba6367f4
parent 95ffdaad
...@@ -379,10 +379,10 @@ char* generate_raw_coding(char* src, ...@@ -379,10 +379,10 @@ char* generate_raw_coding(char* src,
"RAW_Force_Omit field_%d_force_omit(%d, force_omit, " "RAW_Force_Omit field_%d_force_omit(%d, force_omit, "
"%s_descr_.raw->forceomit);\n" "%s_descr_.raw->forceomit);\n"
"int decoded_field_length = field_%s%s.RAW_decode(%s_descr_, " "int decoded_field_length = field_%s%s.RAW_decode(%s_descr_, "
"p_buf, limit, local_top_order, TRUE, -1, ", "p_buf, limit, local_top_order, TRUE, %s, ",
i, i, sdef->elements[i].typedescrname, i, i, sdef->elements[i].typedescrname,
sdef->elements[i].name, sdef->elements[i].isOptional ? "()" : "", sdef->elements[i].name, sdef->elements[i].isOptional ? "()" : "",
sdef->elements[i].typedescrname); sdef->elements[i].typedescrname, repeatable?"1":"-1");
if (repeatable) if (repeatable)
src = mputprintf(src, "field_map[%lu] == 0", src = mputprintf(src, "field_map[%lu] == 0",
(unsigned long) i); (unsigned long) i);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment