Mesa (master): ilo: fix a buffer overrun
Chia-I Wu
olv at kemper.freedesktop.org
Sat Jun 20 03:20:55 UTC 2015
Module: Mesa
Branch: master
Commit: 73f0d6d22db21f1fa553d8a26687edc5083e3c23
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=73f0d6d22db21f1fa553d8a26687edc5083e3c23
Author: Chia-I Wu <olvaffe at gmail.com>
Date: Fri Jun 19 23:29:32 2015 +0800
ilo: fix a buffer overrun
Add missing parentheses in SURFTYPE_NULL initialization.
---
src/gallium/drivers/ilo/core/ilo_state_surface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/ilo/core/ilo_state_surface.c b/src/gallium/drivers/ilo/core/ilo_state_surface.c
index be7225b..5be9f8f 100644
--- a/src/gallium/drivers/ilo/core/ilo_state_surface.c
+++ b/src/gallium/drivers/ilo/core/ilo_state_surface.c
@@ -89,7 +89,7 @@ surface_set_gen7_null_SURFACE_STATE(struct ilo_state_surface *surf,
STATIC_ASSERT(ARRAY_SIZE(surf->surface) >= 13);
surf->surface[0] = dw0;
memset(&surf->surface[1], 0, sizeof(uint32_t) *
- ((ilo_dev_gen(dev) >= ILO_GEN(8)) ? 13 : 8) - 1);
+ (((ilo_dev_gen(dev) >= ILO_GEN(8)) ? 13 : 8) - 1));
return true;
}
More information about the mesa-commit
mailing list