[Scummvm-cvs-logs] SF.net SVN: scummvm:[35579] scummvm/trunk/graphics/video/smk_player.cpp
drmccoy at users.sourceforge.net
drmccoy at users.sourceforge.net
Sat Dec 27 19:57:37 CET 2008
Revision: 35579
http://scummvm.svn.sourceforge.net/scummvm/?rev=35579&view=rev
Author: drmccoy
Date: 2008-12-27 18:57:36 +0000 (Sat, 27 Dec 2008)
Log Message:
-----------
Fixing the invalid read (BitStream having a 2 byte lookahead and all :P)
Modified Paths:
--------------
scummvm/trunk/graphics/video/smk_player.cpp
Modified: scummvm/trunk/graphics/video/smk_player.cpp
===================================================================
--- scummvm/trunk/graphics/video/smk_player.cpp 2008-12-27 18:03:27 UTC (rev 35578)
+++ scummvm/trunk/graphics/video/smk_player.cpp 2008-12-27 18:57:36 UTC (rev 35579)
@@ -569,9 +569,11 @@
if (_header.audioInfo[i].hasAudio && chunkSize > 0 && i == 0) {
// If it's track 0, play the audio data
- byte *soundBuffer = new byte[chunkSize];
+ byte *soundBuffer = new byte[chunkSize + 2];
_fileStream->read(soundBuffer, chunkSize);
+ soundBuffer[chunkSize] = 0;
+ soundBuffer[chunkSize + 1] = 0;
if (_header.audioInfo[i].isCompressed) {
// Compressed audio (Huffman DPCM encoded)
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