From 879ea9432dfe60e763f3dac8eb56fd1d37613a27 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 29 Dec 2017 09:59:02 -0700 Subject: [PATCH] svga: add assertion in svga_queue_rs() Reviewed-by: Neha Bhende Reviewed-by: Charmaine Lee --- src/gallium/drivers/svga/svga_state_rss.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/svga/svga_state_rss.c b/src/gallium/drivers/svga/svga_state_rss.c index d864da4b0bd..b68d85ff20c 100644 --- a/src/gallium/drivers/svga/svga_state_rss.c +++ b/src/gallium/drivers/svga/svga_state_rss.c @@ -68,6 +68,7 @@ do { \ static inline void svga_queue_rs(struct rs_queue *q, unsigned rss, unsigned value) { + assert(q->rs_count < ARRAY_SIZE(q->rs)); q->rs[q->rs_count].state = rss; q->rs[q->rs_count].uintValue = value; q->rs_count++; -- 2.30.2