[PATCH] fixed #2218
authorjeanlf <jeanlf@gpac.io>
Tue, 12 Jul 2022 16:43:33 +0000 (18:43 +0200)
committerMoritz Mühlenhoff <jmm@debian.org>
Mon, 19 Jun 2023 21:46:06 +0000 (22:46 +0100)
Gbp-Pq: Name CVE-2022-36190_36191.patch

include/gpac/internal/isomedia_dev.h

index 3a18910bfb67a0a9df7b3e007ce42a5b5becac02..1090d1b4469e72ed331db95e89d2d7ac9b915cf1 100644 (file)
@@ -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