text_import: gracefully handle hexdump without trailing LF
Adjust the grammar to recognize two trailing hexadecimal characters
without a LF as a byte as well. Ported from text2pcap and commit
22cf80d30d
which explains why this
is safe. More work for #16724.
This commit is contained in:
parent
1b5acc8d57
commit
50d66b6346
|
@ -99,10 +99,9 @@ DIAG_OFF_FLEX
|
|||
|
||||
%}
|
||||
|
||||
hexdigit [0-9A-Fa-f]
|
||||
directive ^#TEXT2PCAP.*\r?\n
|
||||
comment ^[\t ]*#.*\r?\n
|
||||
byte [0-9A-Fa-f][0-9A-Fa-f][ \t]
|
||||
byte [0-9A-Fa-f][0-9A-Fa-f][ \t]?
|
||||
byte_eol [0-9A-Fa-f][0-9A-Fa-f]\r?\n
|
||||
offset [0-9A-Fa-f]+[: \t]
|
||||
offset_eol [0-9A-Fa-f]+\r?\n
|
||||
|
|
Loading…
Reference in New Issue