PR #24514 opened by michaelni URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24514 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24514.patch
s->dm is allocated once DM metadata is present, but with compression enabled cmp_dm_level0() dereferenced it unconditionally. Fixes: NULL pointer dereference Fixes: 1fsqvEdvoL5U Found-by: Zheng Yu @ Depthfirst >From aca1d67bb2779bf1afad4c606e6d6cf10e3b0c5c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer <[email protected]> Date: Tue, 15 Sep 2026 06:13:53 +0200 Subject: [PATCH] avcodec/dovi_rpuenc: compress the DM metadata only against previous DM metadata s->dm is allocated once DM metadata is present, but with compression enabled cmp_dm_level0() dereferenced it unconditionally. Fixes: NULL pointer dereference Fixes: 1fsqvEdvoL5U Found-by: Zheng Yu @ Depthfirst --- libavcodec/dovi_rpuenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dovi_rpuenc.c b/libavcodec/dovi_rpuenc.c index d0abcc0d9e..4bd87f496f 100644 --- a/libavcodec/dovi_rpuenc.c +++ b/libavcodec/dovi_rpuenc.c @@ -738,7 +738,7 @@ int ff_dovi_rpu_generate(DOVIContext *s, const AVDOVIMetadata *metadata, dm_compression = 0; if (dv_md_compression != AV_DOVI_COMPRESSION_NONE) { - if (!cmp_dm_level0(s->dm, color) && try_reuse_ext(s->ext_blocks, metadata)) + if (s->dm && !cmp_dm_level0(s->dm, color) && try_reuse_ext(s->ext_blocks, metadata)) dm_compression = 1; } -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
