From 9244a7e4b02692e9c39ad7699ebbf7cb58b788a0 Mon Sep 17 00:00:00 2001 From: jeanlf Date: Mon, 3 Jan 2022 11:24:15 +0100 Subject: [PATCH] [PATCH] fixed #2008 Gbp-Pq: Name CVE-2021-46047.patch --- src/media_tools/isom_hinter.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/media_tools/isom_hinter.c b/src/media_tools/isom_hinter.c index f423480..0863a74 100644 --- a/src/media_tools/isom_hinter.c +++ b/src/media_tools/isom_hinter.c @@ -1265,10 +1265,13 @@ GF_Err gf_hinter_finalize(GF_ISOFile *file, GF_SDP_IODProfile IOD_Profile, u32 b } gf_isom_sample_del(&samp); } - if (remove_ocr) esd->OCRESID = 0; - else if (esd->OCRESID == esd->ESID) esd->OCRESID = 0; - gf_list_add(iod->ESDescriptors, esd); + if (esd) { + if (remove_ocr) esd->OCRESID = 0; + else if (esd->OCRESID == esd->ESID) esd->OCRESID = 0; + + gf_list_add(iod->ESDescriptors, esd); + } if (is_ok) { u32 has_a, has_v, has_i_a, has_i_v; -- 2.30.2