diff options
author | Joost Peters | 2004-08-19 11:16:55 +0000 |
---|---|---|
committer | Joost Peters | 2004-08-19 11:16:55 +0000 |
commit | 9fadfae98d859d762b1afd12d111d6246a846132 (patch) | |
tree | c368a7360686910f3b0e521ad14551ae7016fbc7 /sky | |
parent | 6ebe5ab30646a31d54c5896808388ae3ed2df3df (diff) | |
download | scummvm-rg350-9fadfae98d859d762b1afd12d111d6246a846132.tar.gz scummvm-rg350-9fadfae98d859d762b1afd12d111d6246a846132.tar.bz2 scummvm-rg350-9fadfae98d859d762b1afd12d111d6246a846132.zip |
Fix potential OOB read
svn-id: r14643
Diffstat (limited to 'sky')
-rw-r--r-- | sky/disk.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sky/disk.cpp b/sky/disk.cpp index 53d2934f2e..97e4508d2f 100644 --- a/sky/disk.cpp +++ b/sky/disk.cpp @@ -124,11 +124,11 @@ uint8 *Disk::loadFile(uint16 fileNr, uint8 *dest) { return NULL; } - _fileFlags = READ_LE_UINT32((filePtr + 5)); + _fileFlags = READ_LE_UINT24(filePtr + 5); _fileSize = _fileFlags & 0x03fffff; _lastLoadedFileSize = _fileSize; - _fileOffset = READ_LE_UINT32((filePtr + 2)) & 0x0ffffff; + _fileOffset = READ_LE_UINT32(filePtr + 2) & 0x0ffffff; cflag = (uint8)((_fileOffset >> 23) & 0x1); _fileOffset &= 0x7FFFFF; |