[PATCH] fixed #1958
authorjeanlf <jeanlf@gpac.io>
Fri, 10 Dec 2021 09:02:48 +0000 (10:02 +0100)
committerAron Xu <aron@debian.org>
Tue, 23 May 2023 11:53:25 +0000 (12:53 +0100)
Gbp-Pq: Name CVE-2021-45292.patch

src/isomedia/box_funcs.c
src/isomedia/hinting.c

index fd463bc2e782f37b0aa903456940ff99e04a83ea..38f65dd922b22abb0effbbc2dc6088ad56ba64bf 100644 (file)
@@ -131,6 +131,7 @@ GF_Err gf_isom_box_parse_ex(GF_Box **outBox, GF_BitStream *bs, u32 parent_type,
                        } else {
                                if (!skip_logs) {
                                        GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Read Box type %s (0x%08X) at position "LLU" has size 0 but is not at root/file level, skipping\n", gf_4cc_to_str(type), type, start));
+                                       return GF_EOS;
                                }
                                return GF_OK;
                        }
index 7b01f8d561ba25b01d116532b0126eaee3c65f9b..b77e3d75825086dc8e9578231bb089e496e06cbb 100644 (file)
@@ -676,6 +676,7 @@ GF_Err gf_isom_hint_rtp_read(GF_RTPPacket *ptr, GF_BitStream *bs)
                while (tempSize < TLVsize) {
                        e = gf_isom_box_parse(&a, bs);
                        if (e) return e;
+                       if (!a) continue;
                        gf_list_add(ptr->TLV, a);
                        tempSize += (u32) a->size;
                }