[Scummvm-cvs-logs] scummvm master -> b40430bc4b199027588c29045c052b20c70240b8

sev- sev at scummvm.org
Sun Apr 21 13:30:33 CEST 2013


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:
095dfcad15 INSANE: Fix potential buffer overflow. CID 1003866
f882374d8a TESTBED: Fix memory leak. CID 1003583
b40430bc4b GUI: Add sanity check to config format. CID 1004153


Commit: 095dfcad152e971662b51b223fb6af9150ed4584
    https://github.com/scummvm/scummvm/commit/095dfcad152e971662b51b223fb6af9150ed4584
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-04-21T04:27:30-07:00

Commit Message:
INSANE: Fix potential buffer overflow. CID 1003866

Changed paths:
    engines/scumm/insane/insane.cpp



diff --git a/engines/scumm/insane/insane.cpp b/engines/scumm/insane/insane.cpp
index b8089ff..d76f7b5 100644
--- a/engines/scumm/insane/insane.cpp
+++ b/engines/scumm/insane/insane.cpp
@@ -466,7 +466,7 @@ void Insane::init_enemyStruct(int n, int32 handler, int32 initializer,
 	_enemy[n].isEmpty = isEmpty;
 	_enemy[n].weapon = weapon;
 	_enemy[n].sound = sound;
-	strncpy(_enemy[n].filename, filename, 20);
+	Common::strlcpy(_enemy[n].filename, filename, 20);
 	_enemy[n].costume4 = costume4;
 	_enemy[n].costume6 = costume6;
 	_enemy[n].costume5 = costume5;


Commit: f882374d8ae5830cfd4bbce8a8786aa90185e598
    https://github.com/scummvm/scummvm/commit/f882374d8ae5830cfd4bbce8a8786aa90185e598
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-04-21T04:27:30-07:00

Commit Message:
TESTBED: Fix memory leak. CID 1003583

Changed paths:
    engines/testbed/midi.cpp



diff --git a/engines/testbed/midi.cpp b/engines/testbed/midi.cpp
index 69d361b..70ede40 100644
--- a/engines/testbed/midi.cpp
+++ b/engines/testbed/midi.cpp
@@ -96,6 +96,10 @@ TestExitStatus MidiTests::playMidiMusic() {
 		Common::String errMsg = MidiDriver::getErrorName(errCode);
 		Testsuite::writeOnScreen(errMsg, Common::Point(0, 100));
 		Testsuite::logPrintf("Error! %s", errMsg.c_str());
+
+		delete smfParser;
+		delete driver;
+
 		return kTestFailed;
 	}
 


Commit: b40430bc4b199027588c29045c052b20c70240b8
    https://github.com/scummvm/scummvm/commit/b40430bc4b199027588c29045c052b20c70240b8
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-04-21T04:27:30-07:00

Commit Message:
GUI: Add sanity check to config format. CID 1004153

Changed paths:
    gui/ThemeParser.cpp



diff --git a/gui/ThemeParser.cpp b/gui/ThemeParser.cpp
index 8285aff..418ec2c 100644
--- a/gui/ThemeParser.cpp
+++ b/gui/ThemeParser.cpp
@@ -691,7 +691,8 @@ bool ThemeParser::parserCallback_layout(ParserNode *node) {
 			return false;
 	}
 
-	Common::parseBool(node->values["center"], center);
+	if (!Common::parseBool(node->values["center"], center))
+		return false;
 
 	if (node->values["type"] == "vertical")
 		_theme->getEvaluator()->addLayout(GUI::ThemeLayout::kLayoutVertical, spacing, center);






More information about the Scummvm-git-logs mailing list