mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-31 11:20:26 +01:00
nv40: Avoid a nasty array overflow leading to a corrupt memory pointer.
This commit is contained in:
parent
f71400876b
commit
2effa9b36c
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue