diff options
-rw-r--r-- | base/engine.cpp | 2 | ||||
-rw-r--r-- | base/main.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/base/engine.cpp b/base/engine.cpp index ff574c6179..cfea95c193 100644 --- a/base/engine.cpp +++ b/base/engine.cpp @@ -139,7 +139,7 @@ void CDECL warning(const char *s, ...) { va_list va; va_start(va, s); - vsprintf(buf, s, va); + vsnprintf(buf, STRINGBUFLEN, s, va); va_end(va); #ifdef __GP32__ //ph0x FIXME: implement fprint? diff --git a/base/main.cpp b/base/main.cpp index 51ca83fe0f..fc9fa4eaea 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -461,7 +461,7 @@ void CDECL debug(int level, const char *s, ...) { return; va_start(va, s); - vsprintf(buf, s, va); + vsnprintf(buf, STRINGBUFLEN, s, va); va_end(va); debugHelper(buf); @@ -472,7 +472,7 @@ void CDECL debug(const char *s, ...) { va_list va; va_start(va, s); - vsprintf(buf, s, va); + vsnprintf(buf, STRINGBUFLEN, s, va); va_end(va); debugHelper(buf); |