mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 20:51:31 +00:00
Fix a potential buffer overflow
This commit is contained in:
parent
915eea8fef
commit
39677c1b0f
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue