[Scummvm-git-logs] scummvm master -> df10ff8ac39b10b1d1a3b1d925950b3f543b2e8a
fracturehill
noreply at scummvm.org
Sat Nov 25 12:25:11 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
df10ff8ac3 NANCY: Fix segfault in decompressor
Commit: df10ff8ac39b10b1d1a3b1d925950b3f543b2e8a
https://github.com/scummvm/scummvm/commit/df10ff8ac39b10b1d1a3b1d925950b3f543b2e8a
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-11-25T14:24:56+02:00
Commit Message:
NANCY: Fix segfault in decompressor
With the new optimizations, the decompressor will read
exactly one byte past the end of its input. This commit makes
the input buffer one byte longer to compensate for that.
Changed paths:
engines/nancy/decompress.cpp
diff --git a/engines/nancy/decompress.cpp b/engines/nancy/decompress.cpp
index f0afb20a6dd..303dab00f6e 100644
--- a/engines/nancy/decompress.cpp
+++ b/engines/nancy/decompress.cpp
@@ -49,7 +49,7 @@ void Decompressor::init(Common::SeekableReadStream &input, Common::WriteStream &
// stream on _every_ read byte. This way we avoid doing a vtable lookup per byte, which makes
// decompression roughly twice as fast
delete[] _input;
- _input = new byte[input.size()];
+ _input = new byte[input.size() + 1];
input.read(_input, input.size());
_pos = _input;
_end = _input + input.size();
More information about the Scummvm-git-logs
mailing list