[Scummvm-git-logs] scummvm master -> 6237bc6e7bc06077beec3424ae9e177a74b545b1

bgK bastien.bouclet at gmail.com
Tue Jun 19 21:03:33 CEST 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
6237bc6e7b MOHAWK: MYST: Fix out of bounds read when redrawing the observatory


Commit: 6237bc6e7bc06077beec3424ae9e177a74b545b1
    https://github.com/scummvm/scummvm/commit/6237bc6e7bc06077beec3424ae9e177a74b545b1
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2018-06-19T20:21:53+02:00

Commit Message:
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.

Changed paths:
    engines/mohawk/myst_stacks/myst.cpp


diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp
index 5a64b8f..a467a65 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);
 		}





More information about the Scummvm-git-logs mailing list