aboutsummaryrefslogtreecommitdiff
path: root/common/util.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2008-11-15 03:16:41 +0000
committerJohannes Schickel2008-11-15 03:16:41 +0000
commit478ee06fb818a5d22a8d20b38cca5052e2a5b947 (patch)
treebdfe00583470a411a668b461a57ff891a35128ab /common/util.cpp
parent486523af51575240a633cec6e62bd498119b6f53 (diff)
downloadscummvm-rg350-478ee06fb818a5d22a8d20b38cca5052e2a5b947.tar.gz
scummvm-rg350-478ee06fb818a5d22a8d20b38cca5052e2a5b947.tar.bz2
scummvm-rg350-478ee06fb818a5d22a8d20b38cca5052e2a5b947.zip
Paranoia: Add destination buffer size to Engine::errorString to help avoiding buffer overflows.
svn-id: r35072
Diffstat (limited to 'common/util.cpp')
-rw-r--r--common/util.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/util.cpp b/common/util.cpp
index 13a810e20f..0b11cf0074 100644
--- a/common/util.cpp
+++ b/common/util.cpp
@@ -465,7 +465,7 @@ static void debugHelper(const char *in_buf, bool caret = true) {
// Next, give the active engine (if any) a chance to augment the message
if (g_engine) {
- g_engine->errorString(in_buf, buf);
+ g_engine->errorString(in_buf, buf, STRINGBUFLEN);
} else {
strcpy(buf, in_buf);
}
@@ -583,7 +583,7 @@ void NORETURN error(const char *s, ...) {
// Next, give the active engine (if any) a chance to augment the message
if (g_engine) {
- g_engine->errorString(buf_input, buf_output);
+ g_engine->errorString(buf_input, buf_output, STRINGBUFLEN);
} else {
strcpy(buf_output, buf_input);
}