From: Matthieu Castet Date: Fri, 14 Sep 2007 20:13:52 +0000 (+0200) Subject: nouveau : check for nmesa->state_cache.atoms overflow X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5e7835625912e5b64c1c0f76c7614367bec40039;p=mesa.git nouveau : check for nmesa->state_cache.atoms overflow --- diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h index 956dd549dca..08058820257 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -149,6 +149,7 @@ extern void nouveau_state_cache_init(nouveauContextPtr nmesa); #define BEGIN_RING_CACHE(subchannel,tag,size) do { \ nmesa->state_cache.dirty=1; \ nmesa->state_cache.current_pos=((tag)/4); \ + assert(nmesa->state_cache.current_pos + size <= NOUVEAU_STATE_CACHE_ENTRIES); \ }while(0) #define OUT_RING_CACHE(n) do { \