Wireshark mailing list archives
Re: Difference between proto_item_set_len and proto_item_set_end
From: Guy Harris <guy () alum mit edu>
Date: Sat, 19 Nov 2016 22:02:20 -0800
On Nov 19, 2016, at 8:58 AM, Jaap Keuter <jaap.keuter () xs4all nl> wrote:
On 19-11-16 16:41, Dmitry Lazurkin wrote:Hello. Function proto_item_set_len modifies fi->value.value.bytes->len, but proto_item_set_end doesn't make same thing. Is it bug?An omission maybe. Guy, Stig, Martin, care to comment?
The modification was introduced by b40d397b1, which is Martin's. I don't see any reason why it shouldn't be done in both routines, as proto_item_set_end() is just "set the length to a value calculated from the specified end offset and the tvbuff into which it's an offset" rather than "set the length to this value". I changed it to do so in 548bf927d427723ad22e8e23186a63a63e4abf43 in the master branch. ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Difference between proto_item_set_len and proto_item_set_end Dmitry Lazurkin (Nov 19)
- Re: Difference between proto_item_set_len and proto_item_set_end Jaap Keuter (Nov 19)
- Re: Difference between proto_item_set_len and proto_item_set_end Guy Harris (Nov 19)
- Re: Difference between proto_item_set_len and proto_item_set_end Jaap Keuter (Nov 19)