[Scummvm-cvs-logs] SF.net SVN: scummvm:[41379] scummvm/trunk/engines/kyra/screen.cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Mon Jun 8 19:47:38 CEST 2009


Revision: 41379
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41379&view=rev
Author:   lordhoto
Date:     2009-06-08 17:47:37 +0000 (Mon, 08 Jun 2009)

Log Message:
-----------
Fix out of bounds memory access in Screen::drawShape.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/screen.cpp

Modified: scummvm/trunk/engines/kyra/screen.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen.cpp	2009-06-08 17:44:45 UTC (rev 41378)
+++ scummvm/trunk/engines/kyra/screen.cpp	2009-06-08 17:47:37 UTC (rev 41379)
@@ -1409,6 +1409,9 @@
 		_dsOffscreenLeft /= _dsScaleW;
 	}
 
+	if (shapeHeight <= 0 || shpWidthScaled1 <= 0)
+		return;
+
 	if (pageNum == 0 || pageNum == 1)
 		addDirtyRect(x, y, shpWidthScaled1, shapeHeight);
 	clearOverlayRect(pageNum, x, y, shpWidthScaled1, shapeHeight);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list