mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
panfrost: initialize sig before use
If only invalid surfaces are passed, we end up using an undefined array as a string. And while this might not be possible, it is hard to reason about, especially for new readers and tools. So let's initialize the buffer as an empty string. CID: 1666581 Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37903>
This commit is contained in:
parent
8147108590
commit
9839db709a
1 changed files with 1 additions and 0 deletions
|
|
@ -406,6 +406,7 @@ pan_preload_get_shader(struct pan_fb_preload_cache *cache,
|
|||
unsigned coord_comps = 0;
|
||||
unsigned sig_offset = 0;
|
||||
char sig[256];
|
||||
sig[0] = '\0';
|
||||
bool first = true;
|
||||
for (unsigned i = 0; i < ARRAY_SIZE(key->surfaces); i++) {
|
||||
const char *type_str, *dim_str;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue