From 7759e21c1439e06085d92f10fedd0bf6bf49cf1d Mon Sep 17 00:00:00 2001 From: jeanlf Date: Tue, 12 Jul 2022 18:43:33 +0200 Subject: [PATCH] [PATCH] fixed #2218 Gbp-Pq: Name CVE-2022-36190_36191.patch --- include/gpac/internal/isomedia_dev.h | 39 +++++++++++++--------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/include/gpac/internal/isomedia_dev.h b/include/gpac/internal/isomedia_dev.h index 3a18910..1090d1b 100644 --- a/include/gpac/internal/isomedia_dev.h +++ b/include/gpac/internal/isomedia_dev.h @@ -1442,7 +1442,7 @@ typedef struct GF_ColourInformationBox *colr; } GF_J2KHeaderBox; -typedef struct +typedef struct __full_video_sample_entry { GF_ISOM_VISUAL_SAMPLE_ENTRY GF_ESDBox *esd; @@ -1474,6 +1474,14 @@ typedef struct /*iPod's hack*/ GF_UnknownUUIDBox *ipod_ext; + //for generic video sample entry + + //box type as specified in the file (not this box's type!!) + u32 EntryType; + //opaque description data (ESDS in MP4, SMI in SVQ3, ...) + u8 *data; + u32 data_size; + } GF_MPEGVisualSampleEntryBox; static const u8 GF_ISOM_IPOD_EXT[][16] = { { 0x6B, 0x68, 0x40, 0xF2, 0x5F, 0x24, 0x4F, 0xC5, 0xBA, 0x39, 0xA5, 0x1B, 0xCF, 0x03, 0x23, 0xF3} }; @@ -1481,16 +1489,7 @@ static const u8 GF_ISOM_IPOD_EXT[][16] = { { 0x6B, 0x68, 0x40, 0xF2, 0x5F, 0x24, Bool gf_isom_is_nalu_based_entry(GF_MediaBox *mdia, GF_SampleEntryBox *_entry); GF_Err gf_isom_nalu_sample_rewrite(GF_MediaBox *mdia, GF_ISOSample *sample, u32 sampleNumber, GF_MPEGVisualSampleEntryBox *entry); -/*this is the default visual sdst (to handle unknown media)*/ -typedef struct -{ - GF_ISOM_VISUAL_SAMPLE_ENTRY - /*box type as specified in the file (not this box's type!!)*/ - u32 EntryType; - /*opaque description data (ESDS in MP4, SMI in SVQ3, ...)*/ - u8 *data; - u32 data_size; -} GF_GenericVisualSampleEntryBox; +typedef struct __full_video_sample_entry GF_GenericVisualSampleEntryBox; enum { @@ -1582,7 +1581,7 @@ typedef struct } GF_PCMConfigBox; -typedef struct +typedef struct __full_audio_sample_entry { GF_ISOM_AUDIO_SAMPLE_ENTRY //for MPEG4 audio @@ -1603,18 +1602,16 @@ typedef struct //for FLAC GF_FLACConfigBox *cfg_flac; -} GF_MPEGAudioSampleEntryBox; - -/*this is the default visual sdst (to handle unknown media)*/ -typedef struct -{ - GF_ISOM_AUDIO_SAMPLE_ENTRY - /*box type as specified in the file (not this box's type!!)*/ + //for generic audio sample entry + //box type as specified in the file (not this box's type!!) u32 EntryType; - /*opaque description data (ESDS in MP4, ...)*/ + //opaque description data (ESDS in MP4, ...) u8 *data; u32 data_size; -} GF_GenericAudioSampleEntryBox; + +} GF_MPEGAudioSampleEntryBox; + +typedef struct __full_audio_sample_entry GF_GenericAudioSampleEntryBox; typedef struct -- 2.30.2