diff options
author | Michael Mann <mmann78@netscape.net> | 2017-04-19 22:51:45 -0400 |
---|---|---|
committer | Jaap Keuter <jaap.keuter@xs4all.nl> | 2017-04-20 09:04:09 +0000 |
commit | 3e755bb0c1b8ad9e466db1d02d76995ce1d39763 (patch) | |
tree | ee3cf742b7900fa357d8fd0c1a8f35dcf614f33e /epan/dissectors/packet-xot.c | |
parent | 6d99d7ff50d84b826686c8aedde55757daf93dd3 (diff) |
packet-xot.c: Handle potentially large representation of packet sizes
Value on wire is 2^x, so represent the field that way.
Bug: 13618
Change-Id: Ida4a85e1f52b29b8b89fa835f78ef3fff2bde5c9
Reviewed-on: https://code.wireshark.org/review/21237
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Diffstat (limited to 'epan/dissectors/packet-xot.c')
-rw-r--r-- | epan/dissectors/packet-xot.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-xot.c b/epan/dissectors/packet-xot.c index c38f82be07..5539a8948b 100644 --- a/epan/dissectors/packet-xot.c +++ b/epan/dissectors/packet-xot.c @@ -257,11 +257,11 @@ static int dissect_xot_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, hdr_offset += 1; proto_tree_add_item(xot_tree, hf_xot_pvc_send_out_window, tvb, hdr_offset, 1, ENC_BIG_ENDIAN); hdr_offset += 1; - pkt_size = 1 << tvb_get_guint8(tvb, hdr_offset); - proto_tree_add_uint(xot_tree, hf_xot_pvc_send_inc_pkt_size, tvb, hdr_offset, 1, pkt_size); + pkt_size = tvb_get_guint8(tvb, hdr_offset); + proto_tree_add_uint_format_value(xot_tree, hf_xot_pvc_send_inc_pkt_size, tvb, hdr_offset, 1, pkt_size, "2^%u", pkt_size); hdr_offset += 1; - pkt_size = 1 << tvb_get_guint8(tvb, hdr_offset); - proto_tree_add_uint(xot_tree, hf_xot_pvc_send_out_pkt_size, tvb, hdr_offset, 1, pkt_size); + pkt_size = tvb_get_guint8(tvb, hdr_offset); + proto_tree_add_uint_format_value(xot_tree, hf_xot_pvc_send_out_pkt_size, tvb, hdr_offset, 1, pkt_size, "2^%u", pkt_size); hdr_offset += 1; proto_tree_add_item(xot_tree, hf_xot_pvc_init_itf_name, tvb, hdr_offset, init_itf_name_len, ENC_ASCII|ENC_NA); hdr_offset += init_itf_name_len; |