From: jeanlf Date: Tue, 1 Feb 2022 14:28:23 +0000 (+0100) Subject: [PATCH] fixed #2092 X-Git-Tag: archive/raspbian/1.0.1+dfsg1-4+rpi1+deb11u3^2~94 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=591ce112ba79c0fb8b5e12fd0a6ae45b85ecacc0;p=gpac.git [PATCH] fixed #2092 Gbp-Pq: Name CVE-2021-4043.patch --- diff --git a/src/isomedia/box_code_base.c b/src/isomedia/box_code_base.c index 280b351..4de52f0 100644 --- a/src/isomedia/box_code_base.c +++ b/src/isomedia/box_code_base.c @@ -10672,10 +10672,12 @@ void gitn_box_del(GF_Box *s) u32 i; GroupIdToNameBox *ptr = (GroupIdToNameBox *)s; if (ptr == NULL) return; - for (i=0; inb_entries; i++) { - if (ptr->entries[i].name) gf_free(ptr->entries[i].name); + if (ptr->entries) { + for (i=0; inb_entries; i++) { + if (ptr->entries[i].name) gf_free(ptr->entries[i].name); + } + gf_free(ptr->entries); } - if (ptr->entries) gf_free(ptr->entries); gf_free(ptr); }