[Scummvm-git-logs] scummvm master -> 7cfd3feec64a6917c85bcc4ea00a5da47a2f1ae0
wonst719
wonst719 at gmail.com
Sun Nov 15 08:33:59 UTC 2020
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:
7cfd3feec6 SCUMM: Fix OOB access in CharsetRendererPC::drawBits1Kor()
Commit: 7cfd3feec64a6917c85bcc4ea00a5da47a2f1ae0
https://github.com/scummvm/scummvm/commit/7cfd3feec64a6917c85bcc4ea00a5da47a2f1ae0
Author: wonst719 (wonst719 at gmail.com)
Date: 2020-11-15T17:33:49+09:00
Commit Message:
SCUMM: Fix OOB access in CharsetRendererPC::drawBits1Kor()
Changed paths:
engines/scumm/charset.cpp
diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp
index 05806aa481..38ddfd12bc 100644
--- a/engines/scumm/charset.cpp
+++ b/engines/scumm/charset.cpp
@@ -785,10 +785,10 @@ void CharsetRendererPC::drawBits1Kor(Graphics::Surface &dest, int x1, int y1, co
dst = origDst;
for (y = 0; y < height && y + drawTop + offsetY[i] < dest.h; y++) {
- for (x = 0; x < width && x + offsetY[i] < dest.w; x++) {
+ for (x = 0; x < width && x + x1 + offsetX[i] < dest.w; x++) {
if ((x % 8) == 0)
bits = *src++;
- if ((bits & revBitMask(x % 8)) && y + drawTop >= 0) {
+ if ((bits & revBitMask(x % 8)) && y + drawTop + offsetY[i] >= 0 && x + x1 + offsetX[i] >= 0) {
if (_enableShadow) {
*(dst + 1) = _shadowColor;
*(dst + dest.pitch) = _shadowColor;
More information about the Scummvm-git-logs
mailing list