[Scummvm-git-logs] scummvm master -> 7564d47e993584bb62fd4cf1f4638d15785fb4d4
dreammaster
dreammaster at scummvm.org
Thu Oct 27 04:16:30 CEST 2016
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:
7564d47e99 IMAGE: Fix incorrect warnings decoding MSRLE images
Commit: 7564d47e993584bb62fd4cf1f4638d15785fb4d4
https://github.com/scummvm/scummvm/commit/7564d47e993584bb62fd4cf1f4638d15785fb4d4
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-10-26T22:16:23-04:00
Commit Message:
IMAGE: Fix incorrect warnings decoding MSRLE images
Changed paths:
image/codecs/msrle.cpp
diff --git a/image/codecs/msrle.cpp b/image/codecs/msrle.cpp
index bb1125e..95cada7 100644
--- a/image/codecs/msrle.cpp
+++ b/image/codecs/msrle.cpp
@@ -72,15 +72,10 @@ void MSRLEDecoder::decode8(Common::SeekableReadStream &stream) {
y--;
output = data + (y * width);
- if (y < 0) {
- warning("MS RLE Codec: Next line is beyond picture bounds");
- return;
- }
-
} else if (value == 1) {
// End of image
-
return;
+
} else if (value == 2) {
// Skip
@@ -99,6 +94,10 @@ void MSRLEDecoder::decode8(Common::SeekableReadStream &stream) {
} else {
// Copy data
+ if (y < 0) {
+ warning("MS RLE Codec: Copy data is beyond picture bounds");
+ return;
+ }
if (output + value > output_end) {
if (stream.pos() + value >= stream.size())
@@ -119,6 +118,10 @@ void MSRLEDecoder::decode8(Common::SeekableReadStream &stream) {
} else {
// Run data
+ if (y < 0) {
+ warning("MS RLE Codec: Run data is beyond picture bounds");
+ return;
+ }
if (output + count > output_end)
continue;
More information about the Scummvm-git-logs
mailing list