From 9eaa5598473606e268360611bb530f78ce267fb7 Mon Sep 17 00:00:00 2001 From: Zhao Zhili Date: Mon, 27 Apr 2026 14:55:32 +0800 Subject: [PATCH] avformat/matroskadec: fix invalid check and uninitialized memory access size is uninitialized when av_dynamic_hdr_smpte2094_app5_alloc failed. Signed-off-by: Zhao Zhili --- libavformat/matroskadec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index de14ff96b8..b303d534aa 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -3973,7 +3973,7 @@ static int matroska_parse_block_additional(MatroskaDemuxContext *matroska, break; // ignore hdr_smpte_2094_app5 = av_dynamic_hdr_smpte2094_app5_alloc(&hdr_smpte_2094_app5_size); - if (!hdr_smpte_2094_app5_size) + if (!hdr_smpte_2094_app5) return AVERROR(ENOMEM); if ((res = av_dynamic_hdr_smpte2094_app5_from_t35(hdr_smpte_2094_app5,