diff options
author | Travis Howell | 2005-02-27 00:42:52 +0000 |
---|---|---|
committer | Travis Howell | 2005-02-27 00:42:52 +0000 |
commit | cf0aac1506fbad0d71c9a50706def63127c16107 (patch) | |
tree | 94c3f78a2a5fb88bd71fdbb9345196fc5873346a /scumm/script_v72he.cpp | |
parent | 72efd4c50e95f55b757fdc50b9c36cbec7977f5d (diff) | |
download | scummvm-rg350-cf0aac1506fbad0d71c9a50706def63127c16107.tar.gz scummvm-rg350-cf0aac1506fbad0d71c9a50706def63127c16107.tar.bz2 scummvm-rg350-cf0aac1506fbad0d71c9a50706def63127c16107.zip |
Add more safety checks.
svn-id: r16939
Diffstat (limited to 'scumm/script_v72he.cpp')
-rw-r--r-- | scumm/script_v72he.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index 7a686e6028..ab11381e31 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -598,8 +598,8 @@ const byte *ScummEngine_v72he::findWrappedBlock(uint32 tag, const byte *ptr, int return NULL; size = getResourceDataSize(offs) / 4; - if ((uint32)state >= (uint32)size) - return NULL; + assert((uint32)state <= (uint32)size); + offs += READ_LE_UINT32(offs + state * sizeof(uint32)); offs = findResourceData(tag, offs - 8); |