diff options
author | Bastien Bouclet | 2018-06-19 20:17:03 +0200 |
---|---|---|
committer | Bastien Bouclet | 2018-06-19 20:21:53 +0200 |
commit | 6237bc6e7bc06077beec3424ae9e177a74b545b1 (patch) | |
tree | b3158bad40dd532dda36c1ecc024a0b3181b1070 /engines | |
parent | 4b80e07c6baefefbd9a269cafb1f8382ff99c841 (diff) | |
download | scummvm-rg350-6237bc6e7bc06077beec3424ae9e177a74b545b1.tar.gz scummvm-rg350-6237bc6e7bc06077beec3424ae9e177a74b545b1.tar.bz2 scummvm-rg350-6237bc6e7bc06077beec3424ae9e177a74b545b1.zip |
MOHAWK: MYST: Fix out of bounds read when redrawing the observatory
The observatory go button computes random 105x106 rectangles in the
512x512 star image. The previous code would allow to go out of bounds by
3 pixels. Interestingly the bug is in the original engine disassembly
perhaps it could crash as well.
Fixes Trac#10576.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mohawk/myst_stacks/myst.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp index 5a64b8fb60..a467a65e75 100644 --- a/engines/mohawk/myst_stacks/myst.cpp +++ b/engines/mohawk/myst_stacks/myst.cpp @@ -1858,7 +1858,7 @@ void Myst::o_observatoryGoButton(uint16 var, const ArgumentsArray &args) { while (end > _vm->getTotalPlayTime()) { _vm->wait(50); - observatoryUpdateVisualizer(_vm->_rnd->getRandomNumber(409), _vm->_rnd->getRandomNumber(409)); + observatoryUpdateVisualizer(_vm->_rnd->getRandomNumber(406), _vm->_rnd->getRandomNumber(406)); _vm->redrawResource(_observatoryVisualizer); } |