projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f714008
)
nv40: Avoid a nasty array overflow leading to a corrupt memory pointer.
author
Maarten Maathuis
<madman2003@gmail.com>
Wed, 13 Feb 2008 21:57:09 +0000
(22:57 +0100)
committer
Maarten Maathuis
<madman2003@gmail.com>
Wed, 13 Feb 2008 21:57:09 +0000
(22:57 +0100)
src/mesa/pipe/nv40/nv40_fragprog.c
patch
|
blob
|
history
diff --git
a/src/mesa/pipe/nv40/nv40_fragprog.c
b/src/mesa/pipe/nv40/nv40_fragprog.c
index 714634396d22267370f03165b9be4e6e2e554584..14897f97982a8ee163b46e13dab1dc1df3262065 100644
(file)
--- a/
src/mesa/pipe/nv40/nv40_fragprog.c
+++ b/
src/mesa/pipe/nv40/nv40_fragprog.c
@@
-716,7
+716,7
@@
nv40_fragprog_translate(struct nv40_context *nv40,
assert(imm->Immediate.DataType == TGSI_IMM_FLOAT32);
assert(fpc->nr_imm < MAX_IMM);
- for (i = 0; i <
imm->Immediate.Size
; i++)
+ for (i = 0; i <
(imm->Immediate.Size - 1)
; i++)
vals[i] = imm->u.ImmediateFloat32[i].Float;
fpc->imm[fpc->nr_imm++] = constant(fpc, -1, vals);
}