From 036bda9166b6f50c096de72d4a110e83c1919403 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Sun, 5 Dec 2021 21:24:57 +0100 Subject: vo_gpu_next: fix UB in query_format() `plane_data_from_imgfmt` doesn't zero-initialize the struct, so this contained invalid values for e.g. `row_stride`, causing formats to *randomly* fail. (Especially any formats with specific alignment requirements) Might fix #9424 and #9425. --- video/out/vo_gpu_next.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index 0d505f7913..d6e9cffd1f 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -820,7 +820,7 @@ static int query_format(struct vo *vo, int format) { struct priv *p = vo->priv; struct pl_bit_encoding bits; - struct pl_plane_data data[4]; + struct pl_plane_data data[4] = {0}; int planes = plane_data_from_imgfmt(data, &bits, format); if (!planes) return false; -- cgit v1.2.3