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

Mishandling of document with only NULL bytes #181

Closed
moorereason opened this issue Dec 11, 2021 · 1 comment
Closed

Mishandling of document with only NULL bytes #181

moorereason opened this issue Dec 11, 2021 · 1 comment

Comments

@moorereason
Copy link

Given a TOML document of any(?) length made with only NULL bytes, toml11 returns a valid, empty document:

$ echo -n '\x00\x00\x00\x00' | check_toml_test
{}

I expect this input to be invalid.

AFAICT if there are any non-NULL bytes after the leading NULL bytes, the parser given an error as expected.

Found while doing differential fuzzing against go-toml/v2.

@ToruNiina
Copy link
Owner

Thank you for reporting! Historically I added this for the null terminated string, but currently we don't need this. I removed it.

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

No branches or pull requests

2 participants