UatModel::insertRows in ui/qt/modles/uat_model.cpp calls the set
callback with an empty string when adding a new row, before the
check callback is called. So the set callback should handle the empty
string and not run off the end if handed invalid entry. Use the same
validation with hex_str_to_bytes in both callbacks so that they agree
about what is valid input.
Prevents a buffer overflow noticed by ASAN.
Asterix data format is a complex family of asterix categories,
where each individual category exists in multiple editions.
As a result of many variants, the epan/dissectors/packet-asterix.c
is one of the largest dissectors.
So far, the asterix dissector had been maintained manually, where the
generic decoding routines and category/edition specific definitions
were entangled in the same file (packet-asterix.c).
This commit preserves the overall dissector structure, but makes
it easy to update the dissector with new categories or editions as
they become available (via the update script from this commit).
See tools/asterix/README.md file for dissector update procedure.
This commit includes:
- tools/asterix/packet-asterix-template.c
Extraction of generic asterix decoding routines and
common data structures.
- tools/asterix/update-specs.py
Update script, to render the template with up-to-date asterix
specs files. The asterix specs files themselves are maintained in
a separate repository.
- epan/dissectors/packet-asterix.c
Automatically generated dissector for asterix data format.
Although generated, this file needs to remain in the repository,
to be able to build the project in a reproducible way.
The generated asterix dissector was additionally tested with:
- ./tools/check_typed_item_calls.py --mask
- ./tools/fuzz-test.sh
Sync with asterix-specs #cef694825c
If we're going to reject a packet because it's not a valid EPL
packet, do so at the beginning, before setting the column values
and changing the port types and values.
Revert to the original design of having a single pattern to catch
everything as unparsed and also try to be less hackish and fragile
parsing "..".
Strings like "80..90" are tricky because it can be parsed as
INTEGER DOTDOT INTEGER or FLOAT FLOAT.
Add parsing of DHCPv4 option 82.9.4491.2..7
- DPoE System Version (2)
- DPoE System DHCPv4 PBB Service (4)
- CMTS CM Service Class (5)
- CMTS MSO Defined Text (6)
- Secure File Transfer URI (7)
Add parsing of DHCPv6 Relay Agent CMTS Capabilities Option 2
- DPoE System Version (2)
Deprecate the usage of significant whitespace to separate set elements
(or anywhere else for that matter). This will make the implementation
simpler and cleaner and the language more expressive and user-friendly.
Add an allocated size element to the TOP_ELEMENT_CONTROL struct and use
it to make sure we're not trying to read past the end of a buffer in
canonify_unencrypted_header. Fixes#17636.
Remove now unused defines. Add the BSAP and BSSAP-LE pinos to the tree
as the parent protocol (so that the BSSAP default proto preference can
be selected from the Packet Details and Packet List).
Set the BSSAP+ Decode As preference with the newer Decode As API, so
that we don't need a preference callback.
Fixup comment to reflect that unparsed is the only token
type for the pattern, there is no "match" or "no match".
Tighten the CIDR patterns and make sure it cannot match a
rogue "..". This is ambiguous with 80..90 and must be treated
extra carefully to support floating point formats without
leading or terminating digits before or after the point.
Reject the default match as a syntax error. This pattern is
just a pitfall to make testing and debugging harder. Matching a
single arbitrary character is never a valid unparsed string,
except by chance.
Currently unused. This might still be useful to differentiate
different spelling of the same token in user messages, like
"==" and "eq", but currently we are not storing test tokens
anyway, so just remove it, it makes everything simpler.
If it's ever necessary it can be added back.
Replace the LVAL macros with a plain variable declaration.
The other macros and assorted compatibility code has been superseded
by the requirement of reentrant flex and the use of more modern flex
options, as far as I can tell.
Using a hand written tokenizer is simpler than using flex start
conditions. Do the validation in the drange node constructor.
Add validation for malformed ranges with different endpoint signs.