[Scummvm-cvs-logs] SF.net SVN: scummvm: [30506] scummvm/trunk/engines/scumm/imuse_digi/ dimuse_sndmgr.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Tue Jan 15 22:56:54 CET 2008


Revision: 30506
          http://scummvm.svn.sourceforge.net/scummvm/?rev=30506&view=rev
Author:   eriktorbjorn
Date:     2008-01-15 13:56:53 -0800 (Tue, 15 Jan 2008)

Log Message:
-----------
Fixed bad memory access. (Wrong index variable when reading sound->marker[].)

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/imuse_digi/dimuse_sndmgr.cpp

Modified: scummvm/trunk/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
===================================================================
--- scummvm/trunk/engines/scumm/imuse_digi/dimuse_sndmgr.cpp	2008-01-15 21:46:12 UTC (rev 30505)
+++ scummvm/trunk/engines/scumm/imuse_digi/dimuse_sndmgr.cpp	2008-01-15 21:56:53 UTC (rev 30506)
@@ -257,10 +257,10 @@
 				break;
 			case MKID_BE('TEXT'):
 				if (!scumm_stricmp((const char *)(ptr + 8), "exit")) {
-					sound->marker[curIndexRegion].pos = READ_BE_UINT32(ptr + 4);
-					sound->marker[curIndexRegion].length = strlen((const char *)(ptr + 8)) + 1;
-					sound->marker[curIndexRegion].ptr = new char[sound->marker[curIndexRegion].length];
-					strcpy(sound->marker[curIndexRegion].ptr, (const char *)(ptr + 8));
+					sound->marker[curIndexMarker].pos = READ_BE_UINT32(ptr + 4);
+					sound->marker[curIndexMarker].length = strlen((const char *)(ptr + 8)) + 1;
+					sound->marker[curIndexMarker].ptr = new char[sound->marker[curIndexMarker].length];
+					strcpy(sound->marker[curIndexMarker].ptr, (const char *)(ptr + 8));
 					curIndexMarker++;
 				}
 				size = READ_BE_UINT32(ptr); ptr += size + 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