mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-26 22:40:50 +00:00
Return in case of possible overflow
This commit is contained in:
parent
ef3c9bf620
commit
bf02575b1e
1 changed files with 3 additions and 1 deletions
|
@ -1110,7 +1110,9 @@ Com_sprintf(char *dest, int size, char *fmt, ...)
|
|||
if ((len >= size) || (len == size))
|
||||
{
|
||||
Com_Printf("Com_sprintf: overflow\n");
|
||||
len = size - 1;
|
||||
|
||||
dest = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
bigbuffer[size - 1] = '\0';
|
||||
|
|
Loading…
Reference in a new issue