From 5b33c74626a471258548660abb82348e664b4db4 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sat, 25 Nov 2023 12:08:19 -0400 Subject: [PATCH] agxdecode: fix stack smash with border colour Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/lib/decode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/asahi/lib/decode.c b/src/asahi/lib/decode.c index e8ec1673bd7..ffe2295c2da 100644 --- a/src/asahi/lib/decode.c +++ b/src/asahi/lib/decode.c @@ -421,7 +421,7 @@ agxdecode_usc(const uint8_t *map, UNUSED uint64_t *link, UNUSED bool verbose, agx_unpack(agxdecode_dump_stream, map, USC_SAMPLER, temp); DUMP_UNPACKED(USC_SAMPLER, temp, "Sampler state\n"); - uint8_t buf[AGX_SAMPLER_LENGTH * temp.count]; + uint8_t buf[(AGX_SAMPLER_LENGTH + AGX_BORDER_LENGTH) * temp.count]; uint8_t *samp = buf; agxdecode_fetch_gpu_array(temp.buffer, buf);