diff options
author | Johannes Schickel | 2008-11-15 03:22:00 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-11-15 03:22:00 +0000 |
commit | f57bf13819836017d9145df87d3c86e929ecbee3 (patch) | |
tree | 2735d7545e547371cd68fba380bf988f593b636e | |
parent | 478ee06fb818a5d22a8d20b38cca5052e2a5b947 (diff) | |
download | scummvm-rg350-f57bf13819836017d9145df87d3c86e929ecbee3.tar.gz scummvm-rg350-f57bf13819836017d9145df87d3c86e929ecbee3.tar.bz2 scummvm-rg350-f57bf13819836017d9145df87d3c86e929ecbee3.zip |
Yet another buffer safetyness fix. (strcpy -> strncpy)
svn-id: r35073
-rw-r--r-- | common/util.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/util.cpp b/common/util.cpp index 0b11cf0074..557106f910 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -467,7 +467,7 @@ static void debugHelper(const char *in_buf, bool caret = true) { if (g_engine) { g_engine->errorString(in_buf, buf, STRINGBUFLEN); } else { - strcpy(buf, in_buf); + strncpy(buf, in_buf, STRINGBUFLEN); } if (caret) @@ -585,7 +585,7 @@ void NORETURN error(const char *s, ...) { if (g_engine) { g_engine->errorString(buf_input, buf_output, STRINGBUFLEN); } else { - strcpy(buf_output, buf_input); + strncpy(buf_output, buf_input, STRINGBUFLEN); } |