Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(parser): Ensure error spans are valid for escape sequences #715

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

epage
Copy link
Member

@epage epage commented Apr 19, 2024

After a \ in a string, the parser consumes the next character and then validates it.
If the validation fails, it means that the parser is now pointing to the next byte after it which could be within a byte sequence.

We likely want to fix up some of these cases so errors point to the right thing but in the mean time, we should make sure this doesn't produce a bad span.

After a `\` in a string, the parser consumes the next character and
then validates it.
If the validation fails, it means that the parser is now pointing to the
next byte after it which could be within a byte sequence.

We likely want to fix up some of these cases so errors point to the
right thing but in the mean time, we should make sure this doesn't
produce a bad span.
@epage epage enabled auto-merge April 19, 2024 14:18
@epage epage merged commit ed26084 into toml-rs:main Apr 19, 2024
12 of 13 checks passed
@epage epage deleted the fuzz branch April 19, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant