From 193686770ce53890807660a35880480b54d9df90 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 13 Oct 2012 19:38:53 +1100 Subject: HOPKINS: Put a TODO in Capture_Mem to clip reading to within the passed surface --- engines/hopkins/graphics.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index 4e240902d2..b1bce4840f 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -1298,7 +1298,8 @@ void GraphicsManager::Capture_Mem(const byte *srcSurface, byte *destSurface, int unsigned int i; int rowCount2; - assert(xs <= SCREEN_WIDTH && ys <= SCREEN_HEIGHT); + // TODO: This code in the original is potentially dangerous, as it doesn't clip the area to within + // the screen, and so thus can read areas outside of the allocated surface buffer srcP = xs + nbrligne2 * ys + srcSurface; destP = destSurface; rowCount = height; -- cgit v1.2.3