- Replace vsprintf function in bg_lib.c with vsnprintf implementation started by Patrick Powell.
- Remove all calls to vsprintf in the engine and gamecode and replace them with calls to vsnprintf.
This commit is contained in:
1 parent
5728fc2ec8
commit
bb47026b5f
19 files changed
+813
-309
No files matched your search
+1
-1
@@ -108,7 +108,7 @@ void QDECL PrintMsg( gentity_t *ent, const char *fmt, ... ) {
|
||||
char *p;
|
||||
|
||||
va_start (argptr,fmt);
|
||||
if (vsprintf (msg, fmt, argptr) > sizeof(msg)) {
|
||||
if (Q_vsnprintf (msg, sizeof(msg), fmt, argptr) > sizeof(msg)) {
|
||||
G_Error ( "PrintMsg overrun" );
|
||||
}
|
||||
va_end (argptr);
|
||||
|
||||
Reference in new issue
Block a user