mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 01:21:17 +00:00
- replaced all usages of insecure vsprintf() function
This commit is contained in:
parent
fc510a7d89
commit
0d968d0943
4 changed files with 4 additions and 4 deletions
|
@ -182,7 +182,7 @@ void I_Error (const char *error, ...)
|
|||
|
||||
va_start(argptr, error);
|
||||
|
||||
vsprintf (errortext, error, argptr);
|
||||
myvsnprintf (errortext, MAX_ERRORTEXT, error, argptr);
|
||||
va_end (argptr);
|
||||
throw CRecoverableError(errortext);
|
||||
}
|
||||
|
|
|
@ -243,7 +243,7 @@ void I_Error (const char *error, ...)
|
|||
|
||||
va_start(argptr, error);
|
||||
|
||||
vsprintf (errortext, error, argptr);
|
||||
myvsnprintf (errortext, MAX_ERRORTEXT, error, argptr);
|
||||
va_end (argptr);
|
||||
throw CRecoverableError(errortext);
|
||||
}
|
||||
|
|
|
@ -827,7 +827,7 @@ void cmsg(int type, int verbosity_level, const char *fmt, ...)
|
|||
char buf[1024];
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
vsprintf(buf, fmt, args);
|
||||
myvsnprintf(buf, sizeof buf, fmt, args);
|
||||
va_end(args);
|
||||
I_DebugPrint(buf);
|
||||
#endif
|
||||
|
|
|
@ -501,7 +501,7 @@ void Writef (HANDLE file, const char *format, ...)
|
|||
DWORD len;
|
||||
|
||||
va_start (args, format);
|
||||
len = vsprintf (buffer, format, args);
|
||||
len = myvsnprintf (buffer, sizeof buffer, format, args);
|
||||
va_end (args);
|
||||
WriteFile (file, buffer, len, &len, NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue