[Scummvm-cvs-logs] SF.net SVN: scummvm: [24246] scummvm/trunk/engines/agos/res_ami.cpp

kirben at users.sourceforge.net kirben at users.sourceforge.net
Mon Oct 9 04:59:44 CEST 2006


Revision: 24246
          http://svn.sourceforge.net/scummvm/?rev=24246&view=rev
Author:   kirben
Date:     2006-10-08 19:59:40 -0700 (Sun, 08 Oct 2006)

Log Message:
-----------
Fix invalid reads during conversion

Modified Paths:
--------------
    scummvm/trunk/engines/agos/res_ami.cpp

Modified: scummvm/trunk/engines/agos/res_ami.cpp
===================================================================
--- scummvm/trunk/engines/agos/res_ami.cpp	2006-10-09 02:12:24 UTC (rev 24245)
+++ scummvm/trunk/engines/agos/res_ami.cpp	2006-10-09 02:59:40 UTC (rev 24246)
@@ -83,8 +83,8 @@
 	uint16 length, i, j, k, word1, word2, word3, word4, cliplength;
 	byte outbyte, outbyte1, x, y;
 	char n;
-	uncbuffer = (byte *)malloc((int32)(height * width / 2));
-	uncbfrout = (byte *)malloc((int32)(height * width / 2));
+	uncbuffer = (byte *)malloc(height * width * 2);
+	uncbfrout = (byte *)malloc(height * width * 2);
 	length = width / 16;
 	length *= height;
 	plane0 = READ_BE_UINT32(clipptr) + clipptr; clipptr += 4; plane0 += 4;


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