Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-bugs: [Wireshark-bugs] [Bug 7911] fix dissection of some GSM RR IEs which include leng

Date: Wed, 24 Oct 2012 11:31:30 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7911

Pascal Quantin <pascal.quantin@xxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pascal.quantin@xxxxxxxxx

--- Comment #2 from Pascal Quantin <pascal.quantin@xxxxxxxxx> 2012-10-24 11:31:29 PDT ---
Hi,

instead of changing the IE definition from TLV to TV, why not use the len
parameter computed by the ELEM_OPT_TLV macro? IMHO, it would look like less
hacky.
If the hf giving the length of the field is really needed (I do not really see
the added value as it is already given by the ELEM_OPT_TLB macro), we could use
a proto_tree_add_uint function call. For example:

@@ -1333,8 +1333,7 @@
      * Spare bits in the end of the field are used to fill the last octet.
      */
     bit_offset = curr_offset << 3;
-    proto_tree_add_bits_item(tree, hf_gsm_a_rr_utran_freq_list_length, tvb,
bit
_offset, 8, ENC_BIG_ENDIAN);
-    bit_offset += 8;
+    proto_tree_add_uint(tree, hf_gsm_a_rr_utran_freq_list_length, tvb,
curr_off
set-1, 1, len);
     while (gsm_rr_csn_flag(tvb, tree, bit_offset++, "Repeating FDD Frequency",
"Present", "Not Present"))
     {
         proto_tree_add_bits_item(tree, hf_gsm_a_rr_fdd_uarfcn, tvb,
bit_offset,
 14, ENC_BIG_ENDIAN);

Note that I'm not fund of the curr_offset-1 and would prefer to remove the
field as its added value is questionable.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.