Skip to content
Permalink
Browse files Browse the repository at this point in the history
fix UAF in audio_sample_entry_Read (#1440)
  • Loading branch information
aureliendavid committed Mar 26, 2020
1 parent fb8d9dc commit 6063b1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/isomedia/box_code_base.c
Expand Up @@ -4069,9 +4069,10 @@ GF_Err audio_sample_entry_Read(GF_Box *s, GF_BitStream *bs)
gf_bs_read_data(bs, data, size);
for (i=0; i<size-8; i++) {
if (GF_4CC((u32)data[i+4], (u8)data[i+5], (u8)data[i+6], (u8)data[i+7]) == GF_ISOM_BOX_TYPE_ESDS) {
extern Bool use_dump_mode;
GF_BitStream *mybs = gf_bs_new(data + i, size - i, GF_BITSTREAM_READ);
if (ptr->esd) {
gf_isom_box_del((GF_Box *)ptr->esd);
if (!use_dump_mode) gf_isom_box_del((GF_Box *)ptr->esd);
ptr->esd=NULL;
}

Expand Down

0 comments on commit 6063b1a

Please sign in to comment.