aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-usb-hid.c
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2013-04-02 21:13:02 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2013-04-02 21:13:02 +0000
commitee5c5e93612f6b9b875cfe8736bf738242c3c11f (patch)
tree9101994fc9188ddf1c9a2325a6b3f5a603cf25dc /epan/dissectors/packet-usb-hid.c
parent432e914dbd43c3ee354aa1eeff8f2dc750913f0e (diff)
Both tvb_length_remaining and tvb_reported_length_remaining can return -1.
#BACKPORT(1.6,1.8 ... manually as other occurrences are in those trunks) svn path=/trunk/; revision=48710
Diffstat (limited to 'epan/dissectors/packet-usb-hid.c')
-rw-r--r--epan/dissectors/packet-usb-hid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-usb-hid.c b/epan/dissectors/packet-usb-hid.c
index 82c62ccacf..2dbf8b8366 100644
--- a/epan/dissectors/packet-usb-hid.c
+++ b/epan/dissectors/packet-usb-hid.c
@@ -455,7 +455,7 @@ dissect_usb_hid_report_item(packet_info *pinfo _U_, proto_tree *parent_tree, tvb
struct usb_hid_global_state cur_global;
memcpy(&cur_global, global, sizeof(struct usb_hid_global_state));
- while (tvb_reported_length_remaining(tvb, offset))
+ while (tvb_reported_length_remaining(tvb, offset) > 0)
{
old_offset=offset;