Skip to content

Commit 7d71906

Browse files
eapachemmann78
authored andcommitted
UMTS_FP: fix handling reserved C/T value
The spec puts the reserved value at 0xf but our internal table has 'unknown' at 0; since all the other values seem to be offset-by-one, just take the modulus 0xf to avoid running off the end of the table. Bug: 12191 Change-Id: I83c8fb66797bbdee52a2246fb1eea6e37cbc7eb0 Reviewed-on: https://code.wireshark.org/review/15722 Reviewed-by: Evan Huus <eapache@gmail.com> Petri-Dish: Evan Huus <eapache@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
1 parent b84b3f9 commit 7d71906

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: epan/dissectors/packet-umts_fp.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -4098,11 +4098,11 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data,
40984098

40994099
/* Peek at C/T, different RLC params for different logical channels */
41004100
/*C/T is 4 bits according to 3GPP TS 25.321, paragraph 9.2.1, from MAC header (not FP)*/
4101-
c_t = tvb_get_bits8(tvb, tb_bit_off/*(2+p_conv_data->num_dch_in_flow)*8*/, 4); /* c_t = tvb_get_guint8(tvb, offset);*/
4102-
macinf->lchid[j+chan] = c_t+1;
4101+
c_t = (tvb_get_bits8(tvb, tb_bit_off/*(2+p_conv_data->num_dch_in_flow)*8*/, 4) + 1) % 0xf; /* c_t = tvb_get_guint8(tvb, offset);*/
4102+
macinf->lchid[j+chan] = c_t;
41034103

4104-
macinf->content[j+chan] = lchId_type_table[c_t+1]; /*Base MAC content on logical channel id (Table is in packet-nbap.h)*/
4105-
rlcinf->mode[j+chan] = lchId_rlc_map[c_t+1]; /*Based RLC mode on logical channel id*/
4104+
macinf->content[j+chan] = lchId_type_table[c_t]; /*Base MAC content on logical channel id (Table is in packet-nbap.h)*/
4105+
rlcinf->mode[j+chan] = lchId_rlc_map[c_t]; /*Based RLC mode on logical channel id*/
41064106
}
41074107
} else {
41084108
fake_lchid = make_fake_lchid(pinfo, p_conv_data->dchs_in_flow_list[chan]);

0 commit comments

Comments
 (0)