projects
/
profile
/
ivi
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a9a8bb
)
mesa: fix error handling for glSelectBuffer
author
Yuanhan Liu
<yuanhan.liu@linux.intel.com>
Mon, 19 Sep 2011 07:03:04 +0000
(15:03 +0800)
committer
Brian Paul
<brianp@vmware.com>
Mon, 19 Sep 2011 14:11:52 +0000
(08:11 -0600)
According the man page, trigger a GL_INVALID_VALUE if size < 0.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
src/mesa/main/feedback.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/feedback.c
b/src/mesa/main/feedback.c
index
597ec1e
..
d73aa08
100644
(file)
--- a/
src/mesa/main/feedback.c
+++ b/
src/mesa/main/feedback.c
@@
-168,6
+168,11
@@
_mesa_SelectBuffer( GLsizei size, GLuint *buffer )
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (size < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glSelectBuffer(size)");
+ return;
+ }
+
if (ctx->RenderMode==GL_SELECT) {
_mesa_error( ctx, GL_INVALID_OPERATION, "glSelectBuffer" );
return; /* KW: added return */