st/xorg: Make sure we don't overrun the fence array in block handler
authorJakob Bornecrantz <jakob@vmware.com>
Wed, 30 Dec 2009 03:22:12 +0000 (04:22 +0100)
committerJakob Bornecrantz <jakob@vmware.com>
Wed, 30 Dec 2009 03:22:12 +0000 (04:22 +0100)
src/gallium/state_trackers/xorg/xorg_driver.c

index bf0a23fe9c2f8a64e92a3c50ca1f9cd0970d5b0d..ee01ba0dcf68b771aec2ff37416da25bac181ff3 100644 (file)
@@ -467,7 +467,7 @@ static void drv_block_handler(int i, pointer blockData, pointer pTimeout,
         * quite small.  Let us get a fair way ahead of hardware before
         * throttling.
         */
-       for (j = 0; j < XORG_NR_FENCES; j++)
+       for (j = 0; j < XORG_NR_FENCES - 1; j++)
           ms->screen->fence_reference(ms->screen,
                                       &ms->fence[j],
                                       ms->fence[j+1]);