Fix a potential buffer overflow

This commit is contained in:
Yamagi Burmeister 2012-06-04 09:12:59 +02:00
parent 915eea8fef
commit 39677c1b0f

View file

@ -147,6 +147,9 @@ void Cbuf_Execute (void) {
break;
}
if( i > sizeof( line ) - 1 ) {
i = sizeof( line ) - 1;
}
memcpy (line, text, i);
line[i] = 0;