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

TINSEL: Fix out-of-bounds memory corruption #5322

Merged
merged 1 commit into from Sep 14, 2023
Merged

Conversation

mikrosk
Copy link
Contributor

@mikrosk mikrosk commented Sep 9, 2023

for's condition is evaluated after the expression(s) so we ended up reading invalid memory in ptp (numPoly == 1 so basically it crashed by the end of first loop).

Strangely this corruption has been visible only in DW demo, with asserts enabled and it seems (judging from the lack of similar reports) only on my m68k atari backend.

I couldn't think of a more elegant solution without rewriting too much code.

for's condition is evaluated after the expression(s) so we ended up
reading invalid memory in ptp.
@sev-
Copy link
Member

sev- commented Sep 14, 2023

Nice catch, thank you!

@sev- sev- merged commit daca89f into scummvm:master Sep 14, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants