diff options
author | Michael Mann <mmann78@netscape.net> | 2016-05-01 12:55:23 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-05-01 20:16:15 +0000 |
commit | 2cb5985bf47bdc8bea78d28483ed224abdd33dc6 (patch) | |
tree | a9e4e5035f4cbc41ad0ba22fad778b4f2e1ef05f /epan/dissectors/packet-usb-masstorage.c | |
parent | 7c79da8c30e39aecb1cddab39f537d8f6a1da25f (diff) |
Make class "type" for USB conversations.
USB dissectors can't assume that only their class type has been passed around in the conversation. Make explicit check that class type expected matches the dissector and stop/prevent dissection if there isn't a match.
Bug: 12356
Change-Id: Ib23973a4ebd0fbb51952ffc118daf95e3389a209
Reviewed-on: https://code.wireshark.org/review/15212
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-usb-masstorage.c')
-rw-r--r-- | epan/dissectors/packet-usb-masstorage.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/epan/dissectors/packet-usb-masstorage.c b/epan/dissectors/packet-usb-masstorage.c index 743775be72..919f7ef364 100644 --- a/epan/dissectors/packet-usb-masstorage.c +++ b/epan/dissectors/packet-usb-masstorage.c @@ -199,9 +199,12 @@ dissect_usb_ms_bulk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, usb_ms_conv_info->itl=wmem_tree_new(wmem_file_scope()); usb_ms_conv_info->itlq=wmem_tree_new(wmem_file_scope()); usb_conv_info->class_data=usb_ms_conv_info; + usb_conv_info->class_data_type = USB_CONV_MASS_STORAGE; + } else if (usb_conv_info->class_data_type != USB_CONV_MASS_STORAGE) { + /* Don't dissect if another USB type is in the conversation */ + return 0; } - is_request=(pinfo->srcport==NO_ENDPOINT); col_set_str(pinfo->cinfo, COL_PROTOCOL, "USBMS"); |