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

COMMON: Don't decompress more bytes than the file specifies (bug 12900) #3347

Merged
merged 1 commit into from Sep 5, 2021

Conversation

@eriktorbjorn
Copy link
Member

@eriktorbjorn eriktorbjorn commented Sep 5, 2021

When running my CD version of Buried in Time, the loadFromCompresedEXE() function would try to decompress beyond the allocated buffer, causing it to crash. Up to that point, the decompressed data was identical to what I would get if I let the original installer decompress the EXE and DLL files.

See https://bugs.scummvm.org/ticket/12900 for details.

When running my CD version of Buried in Time, the loadFromCompresedEXE()
function would try to decompress beyond the allocated buffer, causing it
to crash. Up to that point, the decompressed data was identical to what
I would get if I let the original installer decompress the EXE and DLL
files.

So keep track of how many bytes have been decompressed, and terminate
when the upper limit is reached.
@bluegr
Copy link
Member

@bluegr bluegr commented Sep 5, 2021

Great! Thanks :)

@bluegr bluegr merged commit 24ea36d into scummvm:master Sep 5, 2021
8 checks passed
@eriktorbjorn
Copy link
Member Author

@eriktorbjorn eriktorbjorn commented Sep 5, 2021

Should this be backported to the release branch?

Edit: It's is now.

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