mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Add bounds check to C_GetNextLabelName(). This isn't really necessary because the extra writes to the label buffer are immediately overwritten by the next label found, but I could see it causing a crash in an edge case where somehow the maximum number of labels had been defined.
git-svn-id: https://svn.eduke32.com/eduke32@7246 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
8b0cce6cb7
commit
f40026a0be
1 changed files with 5 additions and 1 deletions
|
@ -1010,7 +1010,11 @@ static void C_GetNextLabelName(void)
|
|||
|
||||
// while (ispecial(*textptr) == 0 && *textptr!='['&& *textptr!=']' && *textptr!='\t' && *textptr!='\n' && *textptr!='\r')
|
||||
while (C_IsLabelChar(*textptr, i))
|
||||
label[(g_labelCnt<<6)+(i++)] = *(textptr++);
|
||||
{
|
||||
if (i < (1<<6)-1)
|
||||
label[(g_labelCnt<<6) + (i++)] = *textptr;
|
||||
textptr++;
|
||||
}
|
||||
|
||||
label[(g_labelCnt<<6)+i] = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue