[FFmpeg-cvslog] avformat/mxfdec: Check container_ul->desc before use

Michael Niedermayer git at videolan.org
Wed Jul 24 17:48:32 EEST 2024


ffmpeg | branch: release/4.3 | Michael Niedermayer <michael at niedermayer.cc> | Fri Jun  7 02:32:13 2024 +0200| [744b0f80acf1089ad5084a490d31ee0737994fca] | committer: Michael Niedermayer

avformat/mxfdec: Check container_ul->desc before use

Fixes: CID1592939 Dereference after null check

Sponsored-by: Sovereign Tech Fund
Reviewed-by: Tomas Härdin <git at haerdin.se>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 4cab028bd0e381f2ed4ccb7f139407f1f6f537c0)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=744b0f80acf1089ad5084a490d31ee0737994fca
---

 libavformat/mxfdec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 2d7937b6e5..9ade5a9cba 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -2562,6 +2562,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
             if (container_ul->desc)
                 av_dict_set(&st->metadata, "data_type", container_ul->desc, 0);
             if (mxf->eia608_extract &&
+                container_ul->desc &&
                 !strcmp(container_ul->desc, "vbi_vanc_smpte_436M")) {
                 st->codecpar->codec_type = AVMEDIA_TYPE_SUBTITLE;
                 st->codecpar->codec_id = AV_CODEC_ID_EIA_608;



More information about the ffmpeg-cvslog mailing list