There is a bug in Wireshark when a dissector has an hf_ variable of type FT_INT64 and the requested length of the field is < 8 bytes. There is no accounting for the sign bit (which has led dissectors to come up with their own solutions). The attached patch attempts to address it. The questions I have is
1. Are these the right places to modify? I thought about pint.h, but I didn't know how to get the "sign check" in there.
2. Is this cross-platform friendly? (I realize it may not be the most optimized solution)
3. Did I go far enough in addressing the "common" uses? Is FT_INT40, etc necessary?
Any other thoughts?
Attachment:
large_signed_ints.patch
Description: Binary data