Mesa (master): glut: Add asserts to check for null pointer dereferences.
Vinson Lee
vlee at kemper.freedesktop.org
Sun Feb 28 05:20:33 UTC 2010
Module: Mesa
Branch: master
Commit: edd6c338cfa69b6bf9cac0922ebb9518fbca7eed
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=edd6c338cfa69b6bf9cac0922ebb9518fbca7eed
Author: Vinson Lee <vlee at vmware.com>
Date: Sat Feb 27 21:19:07 2010 -0800
glut: Add asserts to check for null pointer dereferences.
---
src/glut/glx/glut_event.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/glut/glx/glut_event.c b/src/glut/glx/glut_event.c
index d6d9638..4cdb814 100644
--- a/src/glut/glx/glut_event.c
+++ b/src/glut/glx/glut_event.c
@@ -664,6 +664,7 @@ processEventsAndTimeouts(void)
case XK_KP_Delete: /* Introduced in X11R6. */
/* The Delete character is really an ASCII key. */
__glutSetWindow(window);
+ assert(keyboard);
keyboard(127, /* ASCII Delete character. */
event.xkey.x, event.xkey.y);
goto skip;
@@ -1311,6 +1312,7 @@ processWindowWorkList(GLUTwindow * window)
}
/* Combine workMask with window->workMask to determine what
finish and debug work there is. */
+ assert(window);
workMask |= window->workMask;
if (workMask & GLUT_FINISH_WORK) {
More information about the mesa-commit
mailing list