mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 20:41:25 +00:00
Merge branch 'setcontrol-buffer-overflow' into 'next'
Fix buffer overflow in setcontrol with 2 arguments See merge request STJr/SRB2!1954
This commit is contained in:
commit
6258f14bab
1 changed files with 3 additions and 2 deletions
|
@ -993,7 +993,7 @@ static void setcontrol(INT32 (*gc)[2])
|
|||
{
|
||||
INT32 numctrl;
|
||||
const char *namectrl;
|
||||
INT32 keynum, keynum1, keynum2;
|
||||
INT32 keynum, keynum1, keynum2 = 0;
|
||||
INT32 player = ((void*)gc == (void*)&gamecontrolbis ? 1 : 0);
|
||||
boolean nestedoverride = false;
|
||||
|
||||
|
@ -1009,6 +1009,7 @@ static void setcontrol(INT32 (*gc)[2])
|
|||
return;
|
||||
}
|
||||
keynum1 = G_KeyNameToNum(COM_Argv(2));
|
||||
if (COM_Argc() > 3)
|
||||
keynum2 = G_KeyNameToNum(COM_Argv(3));
|
||||
keynum = G_FilterKeyByVersion(numctrl, 0, player, &keynum1, &keynum2, &nestedoverride);
|
||||
|
||||
|
|
Loading…
Reference in a new issue