mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-22 02:00:22 +01:00
check if button >= GLUT_MAX_MENUS in glutAttacheMenu()
This commit is contained in:
parent
adc0490420
commit
700359ca5a
1 changed files with 4 additions and 0 deletions
|
|
@ -1000,6 +1000,10 @@ glutAddSubMenu(const char *label, int menu)
|
|||
void GLUTAPIENTRY
|
||||
glutAttachMenu(int button)
|
||||
{
|
||||
/* if button >= GLUT_MAX_MENUS, we'll go out of array bounds below */
|
||||
if (button >= GLUT_MAX_MENUS) {
|
||||
return;
|
||||
}
|
||||
if (__glutMappedMenu) {
|
||||
__glutMenuModificationError();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue