From 3ea3237800a9ed24a6f46ceeb2ff7b26f187f19a Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Fri, 20 Nov 2015 12:15:36 +0100 Subject: usbvideo: fix Malformed packet error for SET_CUR The SET_CUR request does not have an extended pseudo-header, the logic likely refers to the extra bytes in the usmon packet header. Remove it since the function handles the payload after that header. Tested with arkmicro_webcam.pcap (from bug 8414) and usb-malformed-error.pcapng.gz (from bug 11736). Bug: 11736 Change-Id: I61c71bb06c37a626260447f703a5cc4db2a6fc80 Reviewed-on: https://code.wireshark.org/review/12005 Reviewed-by: Anders Broman --- epan/dissectors/packet-usb-video.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/epan/dissectors/packet-usb-video.c b/epan/dissectors/packet-usb-video.c index 3de3926cbe..3f22c29e50 100644 --- a/epan/dissectors/packet-usb-video.c +++ b/epan/dissectors/packet-usb-video.c @@ -1837,10 +1837,6 @@ dissect_usb_vid_get_set(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, proto_tree_add_item(tree, hf_usb_vid_length, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; - - /* If there is an extended pseudo header, skip over it to reach the payload */ - if ((usb_trans_info->setup.request == USB_SETUP_SET_CUR) && (usb_trans_info->header_type == USB_HEADER_LINUX_64_BYTES)) - offset += 16; } else { -- cgit v1.2.1