From 39d7bbe2bf3a74e1107b456c2e6b1dd38b521da2 Mon Sep 17 00:00:00 2001 From: Brad Barden Date: Sun, 11 Jan 2026 18:29:08 -0600 Subject: [PATCH] video/out/drm_common: fix uninitialized var Add a missing variable initialization. The variable is only conditionally set later. Then there is a check for a NULL if no CTA block was found, but the value is instead uninitialized memory. There would then be a segfault when the pointer is de-referenced. --- video/out/drm_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/out/drm_common.c b/video/out/drm_common.c index ffc5ebfbad..2e82c3fa37 100644 --- a/video/out/drm_common.c +++ b/video/out/drm_common.c @@ -648,7 +648,7 @@ static void setup_edid(struct vo_drm_state *drm) drm->chromaticity = di_edid_get_chromaticity_coords(edid); - const struct di_edid_cta *cta; + const struct di_edid_cta *cta = NULL; const struct di_edid_ext *const *exts = di_edid_get_extensions(edid); while (*exts && !(cta = di_edid_ext_get_cta(*exts++)));