From a7389070c1c77ed83d8f3c850267e2bc8b398209 Mon Sep 17 00:00:00 2001 From: "M. Kristall" Date: Tue, 29 Dec 2009 17:40:26 +0000 Subject: * Remove unnecessary security code introduced from ioq3 merge --- src/qcommon/cmd.c | 16 ---------------- src/qcommon/qcommon.h | 1 - 2 files changed, 17 deletions(-) (limited to 'src/qcommon') diff --git a/src/qcommon/cmd.c b/src/qcommon/cmd.c index 80e991cd..7ce50ccc 100644 --- a/src/qcommon/cmd.c +++ b/src/qcommon/cmd.c @@ -469,22 +469,6 @@ char *Cmd_Cmd(void) return cmd.cmd; } -/* - Replace command separators with space to prevent interpretation - This is a hack to protect buggy qvms - https://bugzilla.icculus.org/show_bug.cgi?id=3593 -*/ -void Cmd_Args_Sanitize( void ) { - int i; - for ( i = 1 ; i < cmd.argc ; i++ ) { - char* c = cmd.argv[i]; - while ((c = strpbrk(c, "\n\r;"))) { - *c = ' '; - ++c; - } - } -} - /* ============ Cmd_TokenizeString diff --git a/src/qcommon/qcommon.h b/src/qcommon/qcommon.h index d7184d80..18f4c5e5 100644 --- a/src/qcommon/qcommon.h +++ b/src/qcommon/qcommon.h @@ -431,7 +431,6 @@ char *Cmd_ArgsFrom( int arg ); void Cmd_ArgsBuffer( char *buffer, int bufferLength ); void Cmd_LiteralArgsBuffer( char *buffer, int bufferLength ); char *Cmd_Cmd (void); -void Cmd_Args_Sanitize( void ); // The functions that execute commands get their parameters with these // functions. Cmd_Argv () will return an empty string, not a NULL // if arg > argc, so string operations are allways safe. -- cgit