mirror of
https://github.com/bearstonem/openmohaa-vr.git
synced 2026-10-18 22:00:21 +02:00
Use safe version of sprintf and strcpy
This commit is contained in:
87 files changed
+402
-395
No files matched your search
@@ -23,6 +23,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
// scriptexception.cpp : Script Exception
|
||||
|
||||
#include "scriptexception.h"
|
||||
#include "q_shared.h"
|
||||
|
||||
#include <cstdarg>
|
||||
|
||||
@@ -50,7 +51,7 @@ ScriptException::ScriptException(const char *format, ...)
|
||||
char data[4100];
|
||||
|
||||
va_start(va, format);
|
||||
vsprintf(data, format, va);
|
||||
Q_vsnprintf(data, sizeof(data), format, va);
|
||||
va_end(va);
|
||||
|
||||
CreateException(data);
|
||||
@@ -67,7 +68,7 @@ void Error(const char *format, ...)
|
||||
char data[4100];
|
||||
|
||||
va_start(va, format);
|
||||
vsprintf(data, format, va);
|
||||
Q_vsnprintf(data, sizeof(data), format, va);
|
||||
va_end(va);
|
||||
|
||||
throw ScriptException((const char *)data);
|
||||
|
||||
Reference in new issue
Block a user