mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Return in case of possible overflow
This commit is contained in:
parent
41a704a13e
commit
afd2f4538c
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