aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/platform/sdl/sdl.cpp1
-rw-r--r--graphics/font.cpp4
2 files changed, 5 insertions, 0 deletions
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 3f85b1a564..96d65c5eb2 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -413,6 +413,7 @@ void OSystem_SDL::setupIcon() {
for (i = 0; i < ncols; i++) {
unsigned char code;
char color[32];
+ memset(color, 0, sizeof(color));
unsigned int col;
if (sscanf(scummvm_icon[1 + i], "%c c %s", &code, color) != 2) {
warning("Wrong format of scummvm_icon[%d] (%s)", 1 + i, scummvm_icon[1 + i]);
diff --git a/graphics/font.cpp b/graphics/font.cpp
index cdf9090625..d254c64264 100644
--- a/graphics/font.cpp
+++ b/graphics/font.cpp
@@ -214,6 +214,8 @@ int bdf_read_header(Common::SeekableReadStream &fp, NewFontData* pf) {
char buf[256];
char facename[256];
char copyright[256];
+ memset(facename, 0, sizeof(facename));
+ memset(copyright, 0, sizeof(copyright));
/* set certain values to errors for later error checking*/
pf->defaultchar = -1;
@@ -235,6 +237,7 @@ int bdf_read_header(Common::SeekableReadStream &fp, NewFontData* pf) {
warning("Error: bad 'FONT'");
return 0;
}
+
pf->facename = strdup(facename);
continue;
}
@@ -243,6 +246,7 @@ int bdf_read_header(Common::SeekableReadStream &fp, NewFontData* pf) {
warning("Error: bad 'COPYRIGHT'");
return 0;
}
+
pf->copyright = strdup(copyright);
continue;
}