Prevent a buffer overflow.

This commit is contained in:
Yamagi Burmeister 2012-06-01 18:13:30 +02:00
parent f9837b9130
commit 32fe0ba21f

View file

@ -124,6 +124,11 @@ void Con_Dump_f (void) {
return;
}
if (con.linewidth > 1024) {
Com_Printf ("con.linewidth too large!\n");
return;
}
Com_sprintf (name, sizeof(name), "%s/%s.txt", FS_Gamedir(), Cmd_Argv(1));
Com_Printf ("Dumped console text to %s.\n", name);