[Scummvm-cvs-logs] CVS: scummvm/scumm nut_renderer.cpp,1.21,1.22

Max Horn fingolfin at users.sourceforge.net
Tue Apr 1 07:34:04 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv7146/scumm

Modified Files:
	nut_renderer.cpp 
Log Message:
Patch 713149: Fix OOB access

Index: nut_renderer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/nut_renderer.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- nut_renderer.cpp	8 Mar 2003 13:26:20 -0000	1.21
+++ nut_renderer.cpp	1 Apr 2003 15:32:17 -0000	1.22
@@ -209,7 +209,7 @@
 			maskpos = 0;
 			for (int32 tx = 0; tx < width; tx++) {
 				byte pixel = *src++;
-				if (x + tx >= 640 || y + ty >= 480)
+				if (x + tx < 0 || x + tx >= _vm->_realWidth || y + ty < 0 || y + ty >= _vm->_realHeight)
 					continue;
 #if 1
 				if (pixel != 0) {





More information about the Scummvm-git-logs mailing list