projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0daa12
)
check for invalid mode in glBegin(), bug 7142
author
Brian Paul
<brian.paul@tungstengraphics.com>
Thu, 8 Jun 2006 23:11:35 +0000
(23:11 +0000)
committer
Brian Paul
<brian.paul@tungstengraphics.com>
Thu, 8 Jun 2006 23:11:35 +0000
(23:11 +0000)
src/mesa/tnl/t_vtx_api.c
patch
|
blob
|
history
diff --git
a/src/mesa/tnl/t_vtx_api.c
b/src/mesa/tnl/t_vtx_api.c
index ed0688965b463c0eed9056bc12f1add7467ce8fa..47652282696c997c112d9a775457371440833047 100644
(file)
--- a/
src/mesa/tnl/t_vtx_api.c
+++ b/
src/mesa/tnl/t_vtx_api.c
@@
-740,6
+740,11
@@
static void GLAPIENTRY _tnl_Begin( GLenum mode )
{
GET_CURRENT_CONTEXT( ctx );
+ if (mode > GL_POLYGON) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBegin(mode)");
+ return;
+ }
+
if (ctx->Driver.CurrentExecPrimitive == PRIM_OUTSIDE_BEGIN_END) {
/* we're not inside a glBegin/End pair */
TNLcontext *tnl = TNL_CONTEXT(ctx);