Wireshark-bugs: [Wireshark-bugs] [Bug 8339] Add support for (USB) variable-length bitmasks
Comment # 7
on bug 8339
from Steve Magnani
Hi Evan,
Thanks for taking the time to review this. Updated patch has been submitted.
I discovered a hole in the big-endian logic of the original patch set, where
the most-significant 4 bytes would be displayed in the root item of "large"
bitmasks instead of the least-significant. FWIW, get_uint_value() and
get_int_value() have the same issue. Since those are used in many places I
didn't want to modify their behavior.
After looking at the get_uint_value() code I decided to add an expert warning
to the root item in cases where a packet specifies a bitmask with more bytes
than the dissector fields can interpret. "Malformed" didn't seem appropriate,
which is one reason I coded this separately rather than having
proto_tree_add_bitmask_len() go through get_uint_value().
Yes, proto_item_add_bitmask_tree() will require updates to handle bitmasks > 4
bytes. Some of the UVC 1.5 structures will need this. I didn't implement
dissection for any that did, preferring to leave that battle for another day.
Re: bug #7933 - I entered that when I was first trying to implement UVC
bmControl dissection. But there was resistance to the idea, and I later
discovered proto_tree_add_bitmask(), which seemed like a better fit for what I
needed as long as I could overlook its 32-bit limitations.
You are receiving this mail because:
- You are watching all bug changes.