Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
epan: Fix the end offsets for hex string items
hex_str_to_bytes_encoding() consumes pairs of hex digits (and optional separator) to turn into bytes. It can return a pointer to the character after the last digit consumed. Don't advance the end pointer after a single unpaired digit that is not consumed as part of the hex string returned. tvb_get_string_bytes() can pass back the end offset. If conversion fails, return the initial offset instead of zero to make repeated calls easier in cases where the full length is not decoded due to errors. Relatedly, no dissector currently uses this return value, because it's not useful currently.
- Loading branch information