From 845f2a73506837e4ec4e0cf8bb99a2d63bdaf1b4 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sun, 26 Jun 2005 20:08:23 +0000 Subject: fix for-loop in _mesa_GetDouble to avoid out of bounds memory read --- src/mesa/main/get.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/main/get.c') diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index b6f08efc34d..fcc879576ce 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -5627,7 +5627,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params ) _mesa_GetFloatv(pname, values); - for (i = 0; values[i] != magic && i < 16; i++) + for (i = 0; i < 16 && values[i] != magic; i++) params[i] = (GLdouble) values[i]; } -- cgit v1.2.3