summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-04-20 15:06:40 +0000
committerBrian Paul <[email protected]>2006-04-20 15:06:40 +0000
commit8a97946e0a25aff2d56bbaf3ed20ba1588129993 (patch)
tree5d660bba84c4ef39b1325ae0dbeba6211b97c6e8 /src/mesa/shader
parent45e05dccd9f6759eca2248c9e2523e735ecfd7f9 (diff)
check glLoadProgramNV len < 0 (bug 6679)
Diffstat (limited to 'src/mesa/shader')
-rw-r--r--src/mesa/shader/nvprogram.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/shader/nvprogram.c b/src/mesa/shader/nvprogram.c
index fadb5be2ade..a485a1733f7 100644
--- a/src/mesa/shader/nvprogram.c
+++ b/src/mesa/shader/nvprogram.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.1
+ * Version: 6.5.1
*
- * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -515,6 +515,11 @@ _mesa_LoadProgramNV(GLenum target, GLuint id, GLsizei len,
return;
}
+ if (len < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glLoadProgramNV(len)");
+ return;
+ }
+
FLUSH_VERTICES(ctx, _NEW_PROGRAM);
prog = (struct program *) _mesa_HashLookup(ctx->Shared->Programs, id);