[Scummvm-cvs-logs] SF.net SVN: scummvm:[44956] scummvm/branches/branch-1-0-0/engines/sword1/ music.cpp

Hkz at users.sourceforge.net Hkz at users.sourceforge.net
Mon Oct 12 00:39:06 CEST 2009


Revision: 44956
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44956&view=rev
Author:   Hkz
Date:     2009-10-11 22:39:06 +0000 (Sun, 11 Oct 2009)

Log Message:
-----------
sword1: backporting of r44951 and r44955 from trunk

Modified Paths:
--------------
    scummvm/branches/branch-1-0-0/engines/sword1/music.cpp

Modified: scummvm/branches/branch-1-0-0/engines/sword1/music.cpp
===================================================================
--- scummvm/branches/branch-1-0-0/engines/sword1/music.cpp	2009-10-11 22:34:01 UTC (rev 44955)
+++ scummvm/branches/branch-1-0-0/engines/sword1/music.cpp	2009-10-11 22:39:06 UTC (rev 44956)
@@ -285,7 +285,7 @@
 
 	tableFile.close();
 
-	if ((size != 0) && (size != 0xffffffff)) {
+	if ((size != 0) && (size != 0xffffffff) && ((int32)(offset + size) <= _file.size())) {
 		_file.seek(offset, SEEK_SET);
 		_audioSource = new Audio::VagStream(_file.readStream(size), loop);
 		fadeUp();


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