[Nouveau] [mesa PATCH] nv50: fix nv50_sampler_state_delete array overflow
Marcin Slusarz
marcin.slusarz at gmail.com
Sun Jun 5 12:00:28 PDT 2011
num_samplers is array of 3 elements, not 5
---
src/gallium/drivers/nv50/nv50_state.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/gallium/drivers/nv50/nv50_state.c b/src/gallium/drivers/nv50/nv50_state.c
index 799f496..8b54d9f 100644
--- a/src/gallium/drivers/nv50/nv50_state.c
+++ b/src/gallium/drivers/nv50/nv50_state.c
@@ -478,7 +478,7 @@ nv50_sampler_state_delete(struct pipe_context *pipe, void *hwcso)
{
unsigned s, i;
- for (s = 0; s < 5; ++s)
+ for (s = 0; s < 3; ++s)
for (i = 0; i < nv50_context(pipe)->num_samplers[s]; ++i)
if (nv50_context(pipe)->samplers[s][i] == hwcso)
nv50_context(pipe)->samplers[s][i] = NULL;
--
1.7.4.1
More information about the Nouveau
mailing list