[Scummvm-git-logs] scummvm master -> 8da86418bfb1701cc39301e2e65b2549c69d7c77

digitall dgturner at iee.org
Wed Aug 1 17:37:07 CEST 2018


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

Summary:
8f7f7a9c2b PARALLACTION: Fix invalid array access at dialogue selection
69df2e2d0e PARALLACTION: Fix null pointer dereference on quit
8da86418bf PARALLACTION: Fix use-after-free on quit


Commit: 8f7f7a9c2bde9be595d53aee1c41f1f6918ddd6e
    https://github.com/scummvm/scummvm/commit/8f7f7a9c2bde9be595d53aee1c41f1f6918ddd6e
Author: Colin Snover (github.com at zetafleet.com)
Date: 2018-08-01T16:44:51+01:00

Commit Message:
PARALLACTION: Fix invalid array access at dialogue selection

Also removes an unnecessary second condition check for oldAnswer
by moving that closer to its point of use.

Changed paths:
    engines/parallaction/dialogue.cpp


diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp
index 4dbedc8..ee92eee 100644
--- a/engines/parallaction/dialogue.cpp
+++ b/engines/parallaction/dialogue.cpp
@@ -253,15 +253,14 @@ int16 DialogueManager::selectAnswerN() {
 
 	_selection = _balloonMan->hitTestDialogueBalloon(_mousePos.x, _mousePos.y);
 
-	VisibleAnswer *oldAnswer = (_oldSelection == NO_ANSWER_SELECTED) ? NULL : &_visAnswers[_oldSelection];
-	VisibleAnswer *answer = &_visAnswers[_selection];
-
 	if (_selection != _oldSelection) {
 		if (_oldSelection != NO_ANSWER_SELECTED) {
+			VisibleAnswer *oldAnswer = &_visAnswers[_oldSelection];
 			_balloonMan->setBalloonText(oldAnswer->_balloon, oldAnswer->_a->_text, BalloonManager::kUnselectedColor);
 		}
 
 		if (_selection != NO_ANSWER_SELECTED) {
+			VisibleAnswer *answer = &_visAnswers[_selection];
 			_balloonMan->setBalloonText(answer->_balloon, answer->_a->_text, BalloonManager::kSelectedColor);
 			_gfx->setItemFrame(_faceId, answer->_a->speakerMood());
 		}


Commit: 69df2e2d0e8a7254da1000c4b2b6cec2edd0b102
    https://github.com/scummvm/scummvm/commit/69df2e2d0e8a7254da1000c4b2b6cec2edd0b102
Author: Colin Snover (github.com at zetafleet.com)
Date: 2018-08-01T16:44:51+01:00

Commit Message:
PARALLACTION: Fix null pointer dereference on quit

Changed paths:
    engines/parallaction/objects.cpp


diff --git a/engines/parallaction/objects.cpp b/engines/parallaction/objects.cpp
index 950d62a..a6ca3fc 100644
--- a/engines/parallaction/objects.cpp
+++ b/engines/parallaction/objects.cpp
@@ -64,7 +64,9 @@ Animation::Animation() {
 
 Animation::~Animation() {
 	free(_scriptName);
-	gfxobj->release();
+	if (gfxobj) {
+		gfxobj->release();
+	}
 }
 
 void Animation::getFrameRect(Common::Rect &r) const {


Commit: 8da86418bfb1701cc39301e2e65b2549c69d7c77
    https://github.com/scummvm/scummvm/commit/8da86418bfb1701cc39301e2e65b2549c69d7c77
Author: Colin Snover (github.com at zetafleet.com)
Date: 2018-08-01T16:44:51+01:00

Commit Message:
PARALLACTION: Fix use-after-free on quit

Parallaction::_gfx is referenced by objects destroyed when
Parallaction::_input is destroyed so it cannot be destroyed first.

Changed paths:
    engines/parallaction/parallaction.cpp


diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index bbe759d..9bf5491 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -108,10 +108,10 @@ Parallaction::~Parallaction() {
 
 	delete _localFlagNames;
 	_char._ani.reset();
+	delete _input;
 	delete _gfx;
 	delete _soundMan;
 	delete _disk;
-	delete _input;
 }
 
 Common::Error Parallaction::init() {





More information about the Scummvm-git-logs mailing list