Prevent rival name code from overflowing
This commit is contained in:
parent
1d6ad4415a
commit
76257fed20
1 changed files with 6 additions and 0 deletions
|
|
@ -829,6 +829,12 @@ static boolean R_ProcessPatchableFields(skin_t *skin, char *stoken, char *value)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (pos > SKINNAMESIZE)
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, "Rival names for skin %s are too long.\n", skin->name);
|
||||
break;
|
||||
}
|
||||
|
||||
rivalname[pos] = value[i];
|
||||
pos++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue