From Steve Magnani

fix USB descriptor parsing

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7909

svn path=/trunk/; revision=45742
This commit is contained in:
Martin Kaiser 2012-10-23 21:02:28 +00:00
parent f05cc88f6f
commit 31f7fee054
1 changed files with 6 additions and 4 deletions

View File

@ -1101,8 +1101,9 @@ dissect_usb_interface_descriptor(packet_info *pinfo, proto_tree *parent_tree, tv
if(item){
proto_item_set_len(item, len);
}
if (offset != old_offset + len) {
/* unknown records */
if (offset < old_offset+len) {
/* skip unknown records */
offset = old_offset + len;
}
return offset;
@ -1225,8 +1226,9 @@ dissect_usb_endpoint_descriptor(packet_info *pinfo, proto_tree *parent_tree, tvb
if(item){
proto_item_set_len(item, len);
}
if (offset != old_offset + len) {
/* unknown records */
if (offset < old_offset+len) {
/* skip unknown records */
offset = old_offset + len;
}
return offset;