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-video.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-video.c')
-rw-r--r-- | epan/dissectors/packet-usb-video.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/epan/dissectors/packet-usb-video.c b/epan/dissectors/packet-usb-video.c index 0bc292000f..3bf08f6156 100644 --- a/epan/dissectors/packet-usb-video.c +++ b/epan/dissectors/packet-usb-video.c @@ -1035,6 +1035,10 @@ dissect_usb_video_control_interface_descriptor(proto_tree *parent_tree, tvbuff_t video_conv_info = wmem_new(wmem_file_scope(), video_conv_info_t); video_conv_info->entities = wmem_tree_new(wmem_file_scope()); usb_conv_info->class_data = video_conv_info; + usb_conv_info->class_data_type = USB_CONV_VIDEO; + } else if (usb_conv_info->class_data_type != USB_CONV_VIDEO) { + /* Stop dissection if another USB type is in the conversation */ + return descriptor_len; } entity = (video_entity_t*) wmem_tree_lookup32(video_conv_info->entities, entity_id); |