From: Brian Paul Date: Fri, 29 Dec 2017 16:59:02 +0000 (-0700) Subject: svga: add assertion in svga_queue_rs() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=879ea9432dfe60e763f3dac8eb56fd1d37613a27;p=mesa.git svga: add assertion in svga_queue_rs() Reviewed-by: Neha Bhende Reviewed-by: Charmaine Lee --- 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++;