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

Off by one in writeBlocksRaw #587

Closed
BebeSparkelSparkel opened this issue Apr 28, 2024 · 3 comments · Fixed by #590
Closed

Off by one in writeBlocksRaw #587

BebeSparkelSparkel opened this issue Apr 28, 2024 · 3 comments · Fixed by #590

Comments

@BebeSparkelSparkel
Copy link
Contributor

writeBlocksRaw uses the same bounds check as writeBlocksCRLF. writeBlocksRaw will always only write one character while writeBlocksCRLF can write two.

Seems like it should actually be

          | n >= len -> commit n True{-needs flush-} False >>= outer s
@mitchellwrosen
Copy link

Can someone comment on the user-facing impact of this bug?

@BebeSparkelSparkel
Copy link
Contributor Author

Under utilization of the char buffer by one byte.

The only time this would cause a problem is if the char buffer had a size of 1 which is never the case.

@Bodigrim
Copy link
Contributor

@mitchellwrosen this is not a vulnerability, just an opportunity to polish.

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 a pull request may close this issue.

3 participants