From cea0cc5b1631874ebc077c25df61975bf1336e3a Mon Sep 17 00:00:00 2001 From: Italo Nicola Date: Mon, 14 Aug 2023 02:32:45 +0000 Subject: [PATCH] panfrost: fix invalid memory access in get_equation_str() Fixes: f55efb4ae68 ("panfrost: Convert to PIPE_BLEND enums internally") Signed-off-by: Italo Nicola Part-of: --- src/panfrost/lib/pan_blend.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/panfrost/lib/pan_blend.c b/src/panfrost/lib/pan_blend.c index adb8a97..52a6209 100644 --- a/src/panfrost/lib/pan_blend.c +++ b/src/panfrost/lib/pan_blend.c @@ -546,8 +546,9 @@ get_equation_str(const struct pan_blend_rt_state *rt_state, char *str, "add", "sub", "reverse_sub", "min", "max", }; const char *factors[] = { - "one", "src_color", "src_alpha", "dst_alpha", "dst_color", - "src_alpha_sat", "const_color", "const_alpha", "src1_color", "src1_alpha", + "", "one", "src_color", "src_alpha", "dst_alpha", + "dst_color", "src_alpha_sat", "const_color", "const_alpha", "src1_color", + "src1_alpha", }; int ret; -- 2.7.4