Wireshark mailing list archives
Re: [Wireshark-commits] master fe195c0: Don't throw for offset at end of TVB with len -1.
From: Guy Harris <guy () alum mit edu>
Date: Fri, 25 Apr 2014 15:13:20 -0700
On Apr 25, 2014, at 2:48 PM, Evan Huus <eapache () gmail com> wrote:
I think conceptually what we need is a way to say "this item isn't associated with any bytes at all, so don't do any bounds checks etc". Negative offsets are already taken in the general case; do we need to special-define a length of -2 for this?
I'd actually like to see lengths become *unsigned*; currently, we need to do some hackery to make sure that length = tvb_get_ntohl(tvb, offset); ... offset += 4; ... proto_tree_add_whatever(..., offset, length, ...); to handle the case where the length has the uppermost bit set. Perhaps there needs to be a call or calls to add items that don't correspond to packet data; those calls might take neither an offset argument nor a length argument (nor even a tvbuff argument?), and would not do any bounds checking. Obviously, they'd have to take an argument corresponding to the value of the item. ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Re: [Wireshark-commits] master fe195c0: Don't throw for offset at end of TVB with len -1. Jeff Morriss (Apr 24)
- Re: [Wireshark-commits] master fe195c0: Don't throw for offset at end of TVB with len -1. Evan Huus (Apr 25)
- Re: [Wireshark-commits] master fe195c0: Don't throw for offset at end of TVB with len -1. Evan Huus (Apr 25)
- Re: [Wireshark-commits] master fe195c0: Don't throw for offset at end of TVB with len -1. Guy Harris (Apr 25)
- Re: [Wireshark-commits] master fe195c0: Don't throw for offset at end of TVB with len -1. Evan Huus (Apr 25)
- Re: [Wireshark-commits] master fe195c0: Don't throw for offset at end of TVB with len -1. Evan Huus (Apr 25)
- Re: [Wireshark-commits] master fe195c0: Don't throw for offset at end of TVB with len -1. Evan Huus (Apr 25)