Lines 988-994
static void printcvar(cvar_t *var, char
Link Here
|
988 |
if(var->flags & CVF_PROTECTED) |
988 |
if(var->flags & CVF_PROTECTED) |
989 |
equals = ':'; |
989 |
equals = ':'; |
990 |
|
990 |
|
991 |
Con_Printf(prefix); |
991 |
Con_Printf("%s", prefix); |
992 |
switch (var->type) |
992 |
switch (var->type) |
993 |
{ |
993 |
{ |
994 |
case CVT_NULL: |
994 |
case CVT_NULL: |
Lines 1304-1310
int Con_Executef(int silent, const char
Link Here
|
1304 |
char buffer[4096]; |
1304 |
char buffer[4096]; |
1305 |
|
1305 |
|
1306 |
va_start(argptr, command); |
1306 |
va_start(argptr, command); |
1307 |
vsprintf(buffer, command, argptr); |
1307 |
vsnprintf(buffer, sizeof(buffer), command, argptr); |
1308 |
va_end(argptr); |
1308 |
va_end(argptr); |
1309 |
return Con_Execute(buffer, silent); |
1309 |
return Con_Execute(buffer, silent); |
1310 |
} |
1310 |
} |
Lines 1966-1972
void conPrintf(int flags, const char *fo
Link Here
|
1966 |
prbuff = malloc(65536); |
1966 |
prbuff = malloc(65536); |
1967 |
|
1967 |
|
1968 |
// Format the message to prbuff. |
1968 |
// Format the message to prbuff. |
1969 |
vsprintf(prbuff, format, args); |
1969 |
vsnprintf(prbuff, sizeof(prbuff), format, args); |
1970 |
|
1970 |
|
1971 |
if(consoleDump) |
1971 |
if(consoleDump) |
1972 |
fprintf(outFile, "%s", prbuff); |
1972 |
fprintf(outFile, "%s", prbuff); |
Lines 2765-2771
void Con_Message(const char *message, ..
Link Here
|
2765 |
buffer = malloc(0x10000); |
2765 |
buffer = malloc(0x10000); |
2766 |
|
2766 |
|
2767 |
va_start(argptr, message); |
2767 |
va_start(argptr, message); |
2768 |
vsprintf(buffer, message, argptr); |
2768 |
vsnprintf(buffer, sizeof(buffer), message, argptr); |
2769 |
va_end(argptr); |
2769 |
va_end(argptr); |
2770 |
|
2770 |
|
2771 |
#ifdef UNIX |
2771 |
#ifdef UNIX |
Lines 2782-2788
void Con_Message(const char *message, ..
Link Here
|
2782 |
printf("%s", buffer); |
2782 |
printf("%s", buffer); |
2783 |
|
2783 |
|
2784 |
// Also print in the console. |
2784 |
// Also print in the console. |
2785 |
Con_Printf(buffer); |
2785 |
Con_Printf("%s", buffer); |
2786 |
|
2786 |
|
2787 |
free(buffer); |
2787 |
free(buffer); |
2788 |
} |
2788 |
} |
Lines 2806-2812
void Con_Error(const char *error, ...)
Link Here
|
2806 |
fprintf(outFile, "Con_Error: Stack overflow imminent, aborting...\n"); |
2806 |
fprintf(outFile, "Con_Error: Stack overflow imminent, aborting...\n"); |
2807 |
|
2807 |
|
2808 |
va_start(argptr, error); |
2808 |
va_start(argptr, error); |
2809 |
vsprintf(buff, error, argptr); |
2809 |
vsnprintf(buff, sizeof(buff), error, argptr); |
2810 |
va_end(argptr); |
2810 |
va_end(argptr); |
2811 |
Sys_MessageBox(buff, true); |
2811 |
Sys_MessageBox(buff, true); |
2812 |
|
2812 |
|
Lines 2821-2827
void Con_Error(const char *error, ...)
Link Here
|
2821 |
Dir_ChDir(&ddRuntimeDir); |
2821 |
Dir_ChDir(&ddRuntimeDir); |
2822 |
|
2822 |
|
2823 |
va_start(argptr, error); |
2823 |
va_start(argptr, error); |
2824 |
vsprintf(err, error, argptr); |
2824 |
vsnprintf(err, sizeof(err), error, argptr); |
2825 |
va_end(argptr); |
2825 |
va_end(argptr); |
2826 |
fprintf(outFile, "%s\n", err); |
2826 |
fprintf(outFile, "%s\n", err); |
2827 |
|
2827 |
|