mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Use safe version of sprintf and strcpy
This commit is contained in:
parent
a69d9d4483
commit
f9d264058b
87 changed files with 402 additions and 395 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue