Skip to content

epan: BCD strings with multiple filler nibbles at the end

John Thacker requested to merge johnthacker/wireshark:bcd_filler into master

3GPP TS 29.060 specifies (7.7.2) that the IMSI IE always takes 8 octets, even though the IMSI can be smaller. Unused semi-octets are always 1 1 1 1 (0xf). This means that when there is a 14 digit IMSI the last octet is 0xff.

The current tvb_get_bcd_string() assumes that the stop digit only occurs in the high nibble (reversed for big endian), i.e. that it is only used when there are an odd number of nibbles. Treat 0xf as a stop digit whether it occurs in either nibble.

Also fix the treatment of the stop digit in the Big Endian case, where it was not being properly masked.

Fix #19716 (closed)

Merge request reports

Loading