[Scummvm-cvs-logs] scummvm master -> 4a7360d29be53dc8ab4ccd2cd8f508cd21ed1c7c

lordhoto lordhoto at gmail.com
Fri Apr 22 21:49:35 CEST 2011


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:
4a7360d29b SCUMM: Do not pass non-string literal but "%s" + string to displayMessage.


Commit: 4a7360d29be53dc8ab4ccd2cd8f508cd21ed1c7c
    https://github.com/scummvm/scummvm/commit/4a7360d29be53dc8ab4ccd2cd8f508cd21ed1c7c
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2011-04-22T12:49:25-07:00

Commit Message:
SCUMM: Do not pass non-string literal but "%s" + string to displayMessage.

Since displayMessages usualy vsnprintf internally it is not quite safe to pass
any string to it, since it might include a format argument like %n, which is
unsafe.

Changed paths:
    engines/scumm/scumm.cpp



diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 7108aab..920887e 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -2494,7 +2494,7 @@ void ScummEngine_v90he::runBootscript() {
 
 void ScummEngine::startManiac() {
 	debug(0, "stub startManiac()");
-	displayMessage(0, _("Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' directory inside the Tentacle game directory."));
+	displayMessage(0, "%s", _("Usually, Maniac Mansion would start now. But ScummVM doesn't do that yet. To play it, go to 'Add Game' in the ScummVM start menu and select the 'Maniac' directory inside the Tentacle game directory."));
 }
 
 #pragma mark -






More information about the Scummvm-git-logs mailing list