Module: Mesa
Branch: master
Commit: d04b07f8e2eb61bb389f2d6b8ed0a501952466ee
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d04b07f8e2eb61bb389f2d6b8ed0a501952466ee

Author: Eric Anholt <[email protected]>
Date:   Thu Apr  9 13:43:55 2015 -0700

vc4: Fix off-by-one in branch target validation.

---

 src/gallium/drivers/vc4/kernel/vc4_validate.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/vc4/kernel/vc4_validate.c 
b/src/gallium/drivers/vc4/kernel/vc4_validate.c
index 6b73587..aeac29e 100644
--- a/src/gallium/drivers/vc4/kernel/vc4_validate.c
+++ b/src/gallium/drivers/vc4/kernel/vc4_validate.c
@@ -287,7 +287,7 @@ validate_branch_to_sublist(VALIDATE_ARGS)
 
        offset = *(uint32_t *)(untrusted + 0);
        if (offset % exec->tile_alloc_init_block_size ||
-           offset / exec->tile_alloc_init_block_size >
+           offset / exec->tile_alloc_init_block_size >=
            exec->bin_tiles_x * exec->bin_tiles_y) {
                DRM_ERROR("VC4_PACKET_BRANCH_TO_SUB_LIST must jump to initial "
                          "tile allocation space.\n");

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to