[Scummvm-git-logs] scummvm master -> 2af9ab6f612214cd00aa16e83db3ca5e8b0c7f19
wjp
wjp at usecode.org
Sat Feb 11 16:56:38 CET 2017
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:
2af9ab6f61 DRASCULA: Add bound check asserts to copyRect
Commit: 2af9ab6f612214cd00aa16e83db3ca5e8b0c7f19
https://github.com/scummvm/scummvm/commit/2af9ab6f612214cd00aa16e83db3ca5e8b0c7f19
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2017-02-11T16:50:28+01:00
Commit Message:
DRASCULA: Add bound check asserts to copyRect
Bug #7110 showed a crash here. Even though that was likely a compiler
error, these extra checks shouldn't hurt.
Changed paths:
engines/drascula/graphics.cpp
diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp
index 09ff3c6..dfe012a 100644
--- a/engines/drascula/graphics.cpp
+++ b/engines/drascula/graphics.cpp
@@ -196,6 +196,11 @@ void DrasculaEngine::copyRect(int xorg, int yorg, int xdes, int ydes, int width,
dest += xdes + ydes * 320;
src += xorg + yorg * 320;
+ assert(xorg >= 0);
+ assert(yorg >= 0);
+ assert(xorg + width <= 320);
+ assert(yorg + height <= 200);
+
int ptr = 0;
for (y = 0; y < height; y++) {
for (x = 0; x < width; x++) {
More information about the Scummvm-git-logs
mailing list