diff options
author | Keith Winstein <keithw@cs.stanford.edu> | 2023-03-10 13:30:30 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-10 13:30:30 -0800 |
commit | a725c63503939731bbc1e3eff43264a216a828de (patch) | |
tree | c5f95b036a91c61a5fc06385c2c5849cc58a8424 /third_party | |
parent | 9990b0cfae3638e862fcfcee4df701c8c414dbe9 (diff) | |
download | wabt-a725c63503939731bbc1e3eff43264a216a828de.tar.gz wabt-a725c63503939731bbc1e3eff43264a216a828de.tar.bz2 wabt-a725c63503939731bbc1e3eff43264a216a828de.zip |
Improve lexing and parsing of invalid annotations (again) (#2166)
This adds a bounds-check to WastLexer::GetText to handle the case when
the offset is earlier than token_start (e.g. because GetStringToken
found a newline in the string and reset token_start to point at it).
Also revises GetIdToken -> GetIdChars to stop skipping the initial char
in an annotation delimiter, which is an idchar+ but not an id token.
Also fixes the WastParser to handle EOF when reading for the end of an
annotation, both for code metadata annotations and other kinds.
Previously this produced an infinite loop (but only with
--enable-annotations).
Fixes #2165
Diffstat (limited to 'third_party')
0 files changed, 0 insertions, 0 deletions