aboutsummaryrefslogtreecommitdiff
path: root/scumm/bundle.cpp
diff options
context:
space:
mode:
authorMax Horn2004-01-02 03:20:07 +0000
committerMax Horn2004-01-02 03:20:07 +0000
commitae4b45952133cdbc76df707b549321a96acf9c89 (patch)
tree3c528bceff4cb4373e78ded6816d3dab41b00a7b /scumm/bundle.cpp
parent315dc0238ce60f1c5216ecd3622bd10d093a8656 (diff)
downloadscummvm-rg350-ae4b45952133cdbc76df707b549321a96acf9c89.tar.gz
scummvm-rg350-ae4b45952133cdbc76df707b549321a96acf9c89.tar.bz2
scummvm-rg350-ae4b45952133cdbc76df707b549321a96acf9c89.zip
Fix for bug #869045 (DIG: Crash in bundle decoder); t'was a buffer overflow
svn-id: r12079
Diffstat (limited to 'scumm/bundle.cpp')
-rw-r--r--scumm/bundle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scumm/bundle.cpp b/scumm/bundle.cpp
index 550ff34ec1..6d674d6abe 100644
--- a/scumm/bundle.cpp
+++ b/scumm/bundle.cpp
@@ -318,8 +318,7 @@ int32 Bundle::decompressVoiceSampleByIndex(int32 index, byte **comp_final) {
}
int32 Bundle::decompressMusicSampleByIndex(int32 index, int32 number, byte *comp_final) {
- int32 i = 0;
- int tag, num, final_size;
+ int final_size;
byte *comp_input;
if (_musicFile.isOpen() == false) {
@@ -328,6 +327,7 @@ int32 Bundle::decompressMusicSampleByIndex(int32 index, int32 number, byte *comp
}
if (_lastSong != index) {
+ int i, tag, num;
_musicFile.seek(_bundleMusicTable[index].offset, SEEK_SET);
tag = _musicFile.readUint32BE();
num = _musicFile.readUint32BE();