svga: add assertion in svga_queue_rs()
authorBrian Paul <brianp@vmware.com>
Fri, 29 Dec 2017 16:59:02 +0000 (09:59 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 11 Jan 2018 15:06:38 +0000 (08:06 -0700)
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/gallium/drivers/svga/svga_state_rss.c

index d864da4b0bd86387b14ba795a84197a0eeb7fbd5..b68d85ff20c415b6fb67f47bf2871beba1c5d689 100644 (file)
@@ -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++;