diff --git a/src/common/command/cmd_parser.c b/src/common/command/cmd_parser.c index b05fc88f..7a5e15b5 100644 --- a/src/common/command/cmd_parser.c +++ b/src/common/command/cmd_parser.c @@ -146,7 +146,10 @@ void Cbuf_Execute (void) { if (text[i] == '\n') break; } - + + if( i > sizeof( line ) - 1 ) { + i = sizeof( line ) - 1; + } memcpy (line, text, i); line[i] = 0;