projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48dedda
)
mesa: Fix NULL deref in optimizer when NumInstructions == 0.
author
Eric Anholt
<eric@anholt.net>
Fri, 20 Nov 2009 20:42:06 +0000
(21:42 +0100)
committer
Eric Anholt
<eric@anholt.net>
Fri, 20 Nov 2009 20:46:48 +0000
(21:46 +0100)
Bug #24984.
src/mesa/shader/prog_optimize.c
patch
|
blob
|
history
diff --git
a/src/mesa/shader/prog_optimize.c
b/src/mesa/shader/prog_optimize.c
index 3d28d885a44f702cbbc8c08b9282e77ecc644c5f..4fe351251e8c8dca85334451d7d96b8610f674e2 100644
(file)
--- a/
src/mesa/shader/prog_optimize.c
+++ b/
src/mesa/shader/prog_optimize.c
@@
-443,7
+443,7
@@
_mesa_remove_extra_move_use(struct gl_program *prog)
* FOO tmpY, arg0, arg1;
*/
- for (i = 0; i
< prog->NumInstructions - 1
; i++) {
+ for (i = 0; i
+ 1 < prog->NumInstructions
; i++) {
const struct prog_instruction *mov = prog->Instructions + i;
if (mov->Opcode != OPCODE_MOV ||