diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2015-05-11 23:46:17 +0200 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-05-12 11:35:40 +0000 |
commit | cc3a66a3098fa5ee66cccd9bf76c170b760b2119 (patch) | |
tree | 962065f8e9b718660378c8e9f58de17ae388aa71 /epan/dissectors/packet-mbim.c | |
parent | d3dbb2b33ac2d81d0cf82d40f12af8e5294eb4fa (diff) |
MBIM: fix dissection of captures taken on a Linux host
- ensure that MBIM tree is not below URB setup one
- do not try to dissect an empty tvb
Change-Id: I8c6655727eec7df84882fd861d5581848340e0f3
Reviewed-on: https://code.wireshark.org/review/8410
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-mbim.c')
-rw-r--r-- | epan/dissectors/packet-mbim.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/dissectors/packet-mbim.c b/epan/dissectors/packet-mbim.c index bc9fb6e2c2..be1aad207f 100644 --- a/epan/dissectors/packet-mbim.c +++ b/epan/dissectors/packet-mbim.c @@ -3660,6 +3660,7 @@ dissect_mbim_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * if ((usb_trans_info->setup.request == 0x00) && (USB_HEADER_IS_LINUX(usb_trans_info->header_type))) { /* Skip Send Encapsulated Command header */ offset += 7; + tree = proto_tree_get_parent_tree(tree); } } @@ -4943,7 +4944,7 @@ dissect_mbim_decode_as(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void usb_conv_info_t *usb_conv_info; usb_trans_info_t *usb_trans_info; - if (!data) { + if (!data || (tvb_reported_length(tvb) == 0)) { return 0; } |