From 47e175ae7ff562b680378914b8826bf0ffce8470 Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Thu, 11 May 2023 14:43:22 -0400 Subject: [PATCH] wlr_drm_format_set_intersect: Clear destination before trying to write to it --- render/drm_format_set.c | 1 + 1 file changed, 1 insertion(+) diff --git a/render/drm_format_set.c b/render/drm_format_set.c index 5028c1ce..df3efd30 100644 --- a/render/drm_format_set.c +++ b/render/drm_format_set.c @@ -221,6 +221,7 @@ bool wlr_drm_format_set_intersect(struct wlr_drm_format_set *dst, // When the two formats have no common modifier, keep // intersecting the rest of the formats: they may be compatible // with each other + out.formats[out.len] = (struct wlr_drm_format){0}; if (!wlr_drm_format_intersect(&out.formats[out.len], &a->formats[i], &b->formats[j])) { wlr_drm_format_set_finish(&out);