summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nv50/nv50_push.c
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2014-01-16 16:53:45 +0000
committerEmil Velikov <[email protected]>2014-01-18 19:17:24 +0000
commit1773611c526844cecee84dd8c8241f888666aa1c (patch)
tree42b8a2a9a59dce22e5aeac87de6a61b1061e3fe5 /src/gallium/drivers/nouveau/nv50/nv50_push.c
parent741e935a72b57cba2999239ce6d2bd3744214376 (diff)
nv50: assert before trying to out-of-bounds access vtxbuf
Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv50/nv50_push.c')
-rw-r--r--src/gallium/drivers/nouveau/nv50/nv50_push.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_push.c b/src/gallium/drivers/nouveau/nv50/nv50_push.c
index 3e9a4096cf0..a3a397c52c1 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_push.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_push.c
@@ -219,6 +219,7 @@ nv50_push_vbo(struct nv50_context *nv50, const struct pipe_draw_info *info)
ctx.packet_vertex_limit = nv50->vertex->packet_vertex_limit;
ctx.vertex_words = nv50->vertex->vertex_size;
+ assert(nv50->num_vtxbufs <= PIPE_MAX_ATTRIBS);
for (i = 0; i < nv50->num_vtxbufs; ++i) {
const struct pipe_vertex_buffer *vb = &nv50->vtxbuf[i];
const uint8_t *data;