projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
adc0490
)
check if button >= GLUT_MAX_MENUS in glutAttacheMenu()
author
Brian Paul
<brian.paul@tungstengraphics.com>
Wed, 10 May 2006 19:21:16 +0000
(19:21 +0000)
committer
Brian Paul
<brian.paul@tungstengraphics.com>
Wed, 10 May 2006 19:21:16 +0000
(19:21 +0000)
src/glut/glx/glut_menu.c
patch
|
blob
|
history
diff --git
a/src/glut/glx/glut_menu.c
b/src/glut/glx/glut_menu.c
index 4e2cac279594e85059d2ae03833e7493aaa09d1e..4c4a5ae7503e4f8ea6ed82e17cd1c76a5a0a6f8a 100644
(file)
--- a/
src/glut/glx/glut_menu.c
+++ b/
src/glut/glx/glut_menu.c
@@
-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();
}