wireshark/test/suite_dfilter
João Valverde 51de43cfd2 dfilter: Fix protocol slices with negative indexes
Field infos have a length property that was not stored with the
field value so when using a negative index the end was computed
from the captured length of the frame tvbuff, leading to incorrect
results. The documentation in wireshark-filter(5) describes how
this was supposed to work but as far as I can tell it never worked
properly.

We now store the length and use that (when it is different from -1)
to locate the end of the protocol data in the tvbuff. An extra wrinkle
is that sometimes the length is set after the field value is created.
This is the most common case as the majority of protocols have a
variable length and dissection generally proceeds with a TVB subset from
the current layer (with offset zero) through all remaining layers to the
end of the captured length. For that reason we must use an expedient to allow
changing the protocol length of an existing protocol fvalue, whenever
proto_item_set_len() is called.

Fixes #17772.
2022-05-23 23:04:07 +01:00
..
__init__.py
dfiltertest.py tests: Remove leftover debug print 2022-04-13 01:15:11 +01:00
group_bytes_ether.py test: convert suite_dfilter to use fixtures 2018-11-15 22:57:40 +00:00
group_bytes_ipv6.py dfilter: Add more IPv6 tests 2022-04-06 18:09:12 +01:00
group_bytes_type.py test: convert suite_dfilter to use fixtures 2018-11-15 22:57:40 +00:00
group_double.py test: convert suite_dfilter to use fixtures 2018-11-15 22:57:40 +00:00
group_function.py dfilter: Add abs() function 2022-04-18 17:09:00 +01:00
group_integer.py dfilter: Add support for binary literal constants 2022-02-23 22:27:59 +00:00
group_integer_1byte.py test: convert suite_dfilter to use fixtures 2018-11-15 22:57:40 +00:00
group_ipv4.py test: convert suite_dfilter to use fixtures 2018-11-15 22:57:40 +00:00
group_membership.py dfilter: Add support for unary arithmetic 2022-03-28 11:20:41 +00:00
group_range_method.py dfilter: Fix protocol slices with negative indexes 2022-05-23 23:04:07 +01:00
group_scanner.py dfilter: Reject invalid character escape sequences 2021-11-23 16:48:02 +00:00
group_string_type.py dfilter: Clean up function parameters semantic check 2021-11-10 02:12:06 +00:00
group_stringz.py test: convert suite_dfilter to use fixtures 2018-11-15 22:57:40 +00:00
group_syntax.py dfilter: Add support for universal quantifiers 2022-05-12 14:26:54 +01:00
group_time_relative.py test: convert suite_dfilter to use fixtures 2018-11-15 22:57:40 +00:00
group_time_type.py dfilter: Add support for entering time in UTC 2021-12-30 17:53:09 +00:00
group_tvb.py tests: Remove tests for non-existent functionality 2021-12-08 07:02:27 +00:00
group_uint64.py test: convert suite_dfilter to use fixtures 2018-11-15 22:57:40 +00:00