[Scummvm-cvs-logs] scummvm master -> 91e6abd3050ed028bab3fd4d1746adb79fe8adcd
tramboi
bertrand_augereau at yahoo.fr
Mon Nov 9 23:58:28 CET 2015
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
06d83f148f GUI: strncat needs a destination C-string
91e6abd305 GUI: Use after free
Commit: 06d83f148f8167fbe3e7c671a91f69e36decf1fe
https://github.com/scummvm/scummvm/commit/06d83f148f8167fbe3e7c671a91f69e36decf1fe
Author: Bertrand Augereau (bertrand.augereau at gmail.com)
Date: 2015-11-09T23:57:29+01:00
Commit Message:
GUI: strncat needs a destination C-string
Changed paths:
gui/ThemeEngine.cpp
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 016cfc1..6c40001 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -746,6 +746,7 @@ bool ThemeEngine::loadDefaultXML() {
xmllen += strlen(defaultXML[i]);
byte *tmpXML = (byte *)malloc(xmllen + 1);
+ tmpXML[0] = '\0';
for (int i = 0; i < ARRAYSIZE(defaultXML); i++)
strncat((char *)tmpXML, defaultXML[i], xmllen);
Commit: 91e6abd3050ed028bab3fd4d1746adb79fe8adcd
https://github.com/scummvm/scummvm/commit/91e6abd3050ed028bab3fd4d1746adb79fe8adcd
Author: Bertrand Augereau (bertrand.augereau at gmail.com)
Date: 2015-11-09T23:57:36+01:00
Commit Message:
GUI: Use after free
Changed paths:
gui/ThemeEngine.cpp
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 6c40001..6562a1d 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -757,8 +757,6 @@ bool ThemeEngine::loadDefaultXML() {
return false;
}
- free(tmpXML);
-
_themeName = "ScummVM Classic Theme (Builtin Version)";
_themeId = "builtin";
_themeFile.clear();
@@ -766,6 +764,8 @@ bool ThemeEngine::loadDefaultXML() {
bool result = _parser->parse();
_parser->close();
+ free(tmpXML);
+
return result;
#else
warning("The built-in theme is not enabled in the current build. Please load an external theme");
More information about the Scummvm-git-logs
mailing list