aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMax Horn2011-04-25 12:46:39 -0700
committerMax Horn2011-04-25 12:46:39 -0700
commit25d97593c50ae88ce1b62f7338233cb478c3160c (patch)
tree82687f76080797443ad21c55f5056820ad0f69d1 /gui
parent3587c3fd8ffb7a2dfde36f46b6bf9f1d30520af0 (diff)
parent55650f364cdf9d0b0ff36479dba0e599004e10ca (diff)
downloadscummvm-rg350-25d97593c50ae88ce1b62f7338233cb478c3160c.tar.gz
scummvm-rg350-25d97593c50ae88ce1b62f7338233cb478c3160c.tar.bz2
scummvm-rg350-25d97593c50ae88ce1b62f7338233cb478c3160c.zip
Merged pull request #25 from Littleboy/corrupted_theme.
ZipArchive and corrupted themes
Diffstat (limited to 'gui')
-rw-r--r--gui/ThemeEngine.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 82104eb7ae..2f9c7ae279 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -1502,6 +1502,12 @@ Common::String ThemeEngine::genLocalizedFontFilename(const Common::String &filen
*********************************************************/
bool ThemeEngine::themeConfigParseHeader(Common::String header, Common::String &themeName) {
+ // Check that header is not corrupted
+ if (header[0] < 0 || header[0] > 127) {
+ warning("Corrupted theme header found");
+ return false;
+ }
+
header.trim();
if (header.empty())