diff options
author | Anders Broman <anders.broman@ericsson.com> | 2012-09-14 11:27:57 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2012-09-14 11:27:57 +0000 |
commit | 6292b7c1195d275a18b959f4ba7ad80ab9b0cc53 (patch) | |
tree | 9a97db5c72278ad7ef4d8b83ce8e3460ba02f779 /epan/dissectors/packet-bthid.c | |
parent | 19f6a77ceeba153c885f99d822b2f5f784df437d (diff) |
From Michal Labedzki:
Bluetooth: minor fix in HID
Applied by hand and changed offset to be signed as per WS convention.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7639
svn path=/trunk/; revision=44896
Diffstat (limited to 'epan/dissectors/packet-bthid.c')
-rw-r--r-- | epan/dissectors/packet-bthid.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-bthid.c b/epan/dissectors/packet-bthid.c index c76122d46a..4d6665ee02 100644 --- a/epan/dissectors/packet-bthid.c +++ b/epan/dissectors/packet-bthid.c @@ -399,8 +399,8 @@ static const value_string keycode_vals[] = { value_string_ext keycode_vals_ext = VALUE_STRING_EXT_INIT(keycode_vals); -static unsigned int -dissect_hid_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned int offset, unsigned int report_type) +static int +dissect_hid_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, unsigned int report_type) { unsigned int protocol_code; unsigned int shortcut_helper = 0; @@ -681,7 +681,7 @@ dissect_bthid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_item *ti; proto_tree *bthid_tree; - unsigned int offset = 0; + int offset = 0; unsigned int transaction_type; unsigned int parameter; unsigned int protocol; @@ -711,7 +711,7 @@ dissect_bthid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; } - ti = proto_tree_add_item(tree, proto_bthid, tvb, offset, -1, FALSE); + ti = proto_tree_add_item(tree, proto_bthid, tvb, offset, -1, ENC_NA); bthid_tree = proto_item_add_subtree(ti, ett_bthid); proto_tree_add_item(bthid_tree, hf_bthid_transaction_type, tvb, offset, 1, ENC_BIG_ENDIAN); @@ -806,7 +806,7 @@ dissect_bthid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; } - if (tvb_length(tvb) > offset) { + if ((int)tvb_length(tvb) > offset) { proto_tree_add_item(bthid_tree, hf_bthid_data, tvb, offset, -1, ENC_BIG_ENDIAN); offset += tvb_length_remaining(tvb, offset); } |