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 string reading bounds checks #1887

Merged
merged 1 commit into from
Aug 24, 2024
Merged

Fix string reading bounds checks #1887

merged 1 commit into from
Aug 24, 2024

Conversation

colinator27
Copy link
Member

Description

Parsing GameMaker null-terminated strings had an off-by-one error in their bounds checks, so if a string appeared directly at the end of a stream, it would throw an exception. This corrects the comparison to no longer be off by one.

Caveats

None that I am aware of, but if this triggers any actual bugs, it's probably extremely rare.

Notes

Based on discussion on Discord, brought to our attention by @luizzeroxis.

@Miepee Miepee merged commit fe1b45b into master Aug 24, 2024
5 checks passed
@colinator27 colinator27 deleted the fix-string-bounds-checks branch August 24, 2024 21:57
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.

2 participants