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:
e4b684c
)
added format/type error check to draw_rgba_pixels()
author
Brian Paul
<brian.paul@tungstengraphics.com>
Tue, 12 Sep 2000 21:09:24 +0000
(21:09 +0000)
committer
Brian Paul
<brian.paul@tungstengraphics.com>
Tue, 12 Sep 2000 21:09:24 +0000
(21:09 +0000)
src/mesa/main/drawpix.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/drawpix.c
b/src/mesa/main/drawpix.c
index
7cf7b00
..
bfc4a59
100644
(file)
--- a/
src/mesa/main/drawpix.c
+++ b/
src/mesa/main/drawpix.c
@@
-1,4
+1,4
@@
-/* $Id: drawpix.c,v 1.3
3 2000/09/08 21:28:0
4 brianp Exp $ */
+/* $Id: drawpix.c,v 1.3
4 2000/09/12 21:09:2
4 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;