From 478ee06fb818a5d22a8d20b38cca5052e2a5b947 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 15 Nov 2008 03:16:41 +0000 Subject: Paranoia: Add destination buffer size to Engine::errorString to help avoiding buffer overflows. svn-id: r35072 --- common/util.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/util.cpp') 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); } -- cgit v1.2.3