aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/drawpix.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2000-09-12 21:09:24 +0000
committerBrian Paul <[email protected]>2000-09-12 21:09:24 +0000
commit8d4bd87c1ad8db33b7cb7eae309abf36f14986d8 (patch)
tree13b6887634130394a144f2fc17b3b3e70fc76058 /src/mesa/main/drawpix.c
parente4b684ce49188f906ff032e2df7675257143ec21 (diff)
added format/type error check to draw_rgba_pixels()
Diffstat (limited to 'src/mesa/main/drawpix.c')
-rw-r--r--src/mesa/main/drawpix.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index 7cf7b0030f6..bfc4a59aa42 100644
--- a/src/mesa/main/drawpix.c
+++ b/src/mesa/main/drawpix.c
@@ -1,4 +1,4 @@
-/* $Id: drawpix.c,v 1.33 2000/09/08 21:28:04 brianp Exp $ */
+/* $Id: drawpix.c,v 1.34 2000/09/12 21:09:24 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -713,6 +713,11 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
GLfloat *convImage = NULL;
GLuint transferOps = ctx->ImageTransferState;
+ if (!_mesa_is_legal_format_and_type(format, type)) {
+ gl_error(ctx, GL_INVALID_ENUM, "glDrawPixels(format or type)");
+ return;
+ }
+
/* Try an optimized glDrawPixels first */
if (fast_draw_pixels(ctx, x, y, width, height, format, type, pixels))
return;