[Mesa-dev] [PATCH] panfrost: Guard against reading past end of buffer
Tomeu Vizoso
tomeu.vizoso at collabora.com
Thu Apr 11 07:10:30 UTC 2019
Signed-off-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
---
src/gallium/drivers/panfrost/pan_swizzle.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/gallium/drivers/panfrost/pan_swizzle.c b/src/gallium/drivers/panfrost/pan_swizzle.c
index 291bd1f88aea..52a907ddd55d 100644
--- a/src/gallium/drivers/panfrost/pan_swizzle.c
+++ b/src/gallium/drivers/panfrost/pan_swizzle.c
@@ -97,6 +97,9 @@ swizzle_bpp1_align16(int width, int height, int source_stride, int block_pitch,
++y;
+ if (y >= height)
+ break;
+
{
int block_y = y & ~(0x0f);
int rem_y = y & 0x0f;
--
2.20.1
More information about the mesa-dev
mailing list