summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomeu Vizoso <[email protected]>2019-04-11 09:09:59 +0200
committerTomeu Vizoso <[email protected]>2019-04-12 07:12:17 +0200
commit8f1c686bca3f98ef8b1e5f1e6b781a8dd2f2c417 (patch)
treedb14564e68562b3315e9dcbf1f144270d497ca24
parentc35ae93803aead8f28f039a7fd1c1251cacfd827 (diff)
panfrost: Guard against reading past end of buffer
Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
-rw-r--r--src/gallium/drivers/panfrost/pan_swizzle.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/panfrost/pan_swizzle.c b/src/gallium/drivers/panfrost/pan_swizzle.c
index 291bd1f88ae..52a907ddd55 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;