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>
This commit is contained in:
Pascal Quantin 2015-05-11 23:46:17 +02:00 committed by Michael Mann
parent d3dbb2b33a
commit cc3a66a309
2 changed files with 6 additions and 1 deletions

View File

@ -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;
}

View File

@ -463,6 +463,10 @@ dissect_usb_com_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *setup_tre
gint offset = 0;
gboolean is_request;
if (tvb_reported_length(tvb) == 0) {
return 0;
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "USBCOM");
tree = proto_tree_get_parent_tree(setup_tree);