aboutsummaryrefslogtreecommitdiff
path: root/engines/m4
diff options
context:
space:
mode:
authorPaul Gilbert2010-09-18 12:08:59 +0000
committerPaul Gilbert2010-09-18 12:08:59 +0000
commit53a5ba21ab3d3130e86bcfef48b2d82ccad628e7 (patch)
tree49806c62082eb5805f7c56ea2d83abdbb3852712 /engines/m4
parent9cab0a5cfea09342667509a5e6c350bd3c4ab704 (diff)
downloadscummvm-rg350-53a5ba21ab3d3130e86bcfef48b2d82ccad628e7.tar.gz
scummvm-rg350-53a5ba21ab3d3130e86bcfef48b2d82ccad628e7.tar.bz2
scummvm-rg350-53a5ba21ab3d3130e86bcfef48b2d82ccad628e7.zip
M4: NULL terminate after a strncpy
svn-id: r52794
Diffstat (limited to 'engines/m4')
-rw-r--r--engines/m4/mads_views.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/engines/m4/mads_views.cpp b/engines/m4/mads_views.cpp
index 58a9a99211..cc127032eb 100644
--- a/engines/m4/mads_views.cpp
+++ b/engines/m4/mads_views.cpp
@@ -397,6 +397,7 @@ int MadsSpriteSlots::addSprites(const char *resName, bool suppressErrors, int fl
// Append on a '.SS' suffix if the resource doesn't already have an extension
char buffer[100];
strncpy(buffer, resName, 95);
+ buffer[95] = '\0';
if (!strchr(buffer, '.'))
strcat(buffer, ".SS");