aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-usb.c
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2023-03-20 15:09:07 +1000
committerTomasz Moń <desowin@gmail.com>2023-05-07 14:23:59 +0200
commitfe3649a8e9d0d795ec24d3598e9a94922fd4d78c (patch)
tree6b86b9daec58723d9ff18492c11ef42e60df59c1 /epan/dissectors/packet-usb.c
parent046f1762b2fa788991d77cbed2298df32100e21b (diff)
USB: fix usbip dissector for fragmented non-iso packets
number_of_packets (0x18) is 0xffffffff for non-iso transfers so don't add -1 * 4 * 4 = 16 bytes to the expected packet length Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'epan/dissectors/packet-usb.c')
-rw-r--r--epan/dissectors/packet-usb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c
index eaa21336cd..6bd0dafb0c 100644
--- a/epan/dissectors/packet-usb.c
+++ b/epan/dissectors/packet-usb.c
@@ -5275,7 +5275,7 @@ dissect_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent,
case USB_HEADER_USBIP:
iso_numdesc = tvb_get_ntohl(tvb, 0x20);
- usb_conv_info->transfer_type = endpoint == 0 ? URB_CONTROL : (iso_numdesc > 0 ? URB_ISOCHRONOUS : URB_UNKNOWN);
+ usb_conv_info->transfer_type = endpoint == 0 ? URB_CONTROL : (iso_numdesc != 0xffffffff ? URB_ISOCHRONOUS : URB_UNKNOWN);
usb_conv_info->direction = ip_header->dir == USBIP_DIR_OUT ? P2P_DIR_SENT : P2P_DIR_RECV;
usb_conv_info->is_setup = endpoint == 0 ? (tvb_get_ntoh64(tvb, 0x28) != G_GUINT64_CONSTANT(0)) : FALSE;
usb_conv_info->is_request = (urb_type==URB_SUBMIT);