[Scummvm-cvs-logs] SF.net SVN: scummvm:[42783] scummvm/trunk/graphics/video/coktelvideo/ coktelvideo.cpp

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Sat Jul 25 20:44:24 CEST 2009


Revision: 42783
          http://scummvm.svn.sourceforge.net/scummvm/?rev=42783&view=rev
Author:   drmccoy
Date:     2009-07-25 18:44:24 +0000 (Sat, 25 Jul 2009)

Log Message:
-----------
Adding more sanity checks to Vmd::renderFrame()

Modified Paths:
--------------
    scummvm/trunk/graphics/video/coktelvideo/coktelvideo.cpp

Modified: scummvm/trunk/graphics/video/coktelvideo/coktelvideo.cpp
===================================================================
--- scummvm/trunk/graphics/video/coktelvideo/coktelvideo.cpp	2009-07-25 18:44:06 UTC (rev 42782)
+++ scummvm/trunk/graphics/video/coktelvideo/coktelvideo.cpp	2009-07-25 18:44:24 UTC (rev 42783)
@@ -1718,8 +1718,10 @@
 	byte *imdVidMem = _vidMem + sW * top + left;
 	byte *srcPtr;
 
-	if ((width < 0) || (height < 0))
+	if ((left < 0) || (top < 0) || (right < 0) || (bottom < 0))
 		return 1;
+	if ((width <= 0) || (height <= 0))
+		return 1;
 
 	uint8 type;
 	byte *dest = imdVidMem;


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