]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
mp4: Don't store the stsd entry count.
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 11 Aug 2021 19:12:13 +0000 (21:12 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 30 May 2022 19:37:35 +0000 (21:37 +0200)
A local variable in read_stsd() will do as well.

mp4.c

diff --git a/mp4.c b/mp4.c
index 9c8e41881c3e163d5ac00014100f83f552a6b228..0834b03dbff885b6d851879bc57dc5405c8857f4 100644 (file)
--- a/mp4.c
+++ b/mp4.c
@@ -18,9 +18,6 @@ struct mp4_track {
        int32_t sampleSize;
        uint16_t sampleRate;
 
-       /* stsd */
-       int32_t stsd_entry_count;
-
        /* stsz */
        int32_t stsz_sample_size;
        int32_t stsz_sample_count;
@@ -570,7 +567,7 @@ static int32_t read_mp4a(struct mp4 *f)
 
 static int32_t read_stsd(struct mp4 *f)
 {
-       int32_t i;
+       int32_t i, entry_count;
        uint8_t header_size = 0;
        struct mp4_track *t;
 
@@ -582,10 +579,10 @@ static int32_t read_stsd(struct mp4 *f)
        read_char(f);   /* version */
        read_int24(f);  /* flags */
 
-       t->stsd_entry_count = read_int32(f);
+       entry_count = read_int32(f);
 
        /* CVE-2017-9253 */
-       for (i = 0; i < t->stsd_entry_count && !f->stream->read_error; i++) {
+       for (i = 0; i < entry_count && !f->stream->read_error; i++) {
                uint64_t skip = get_position(f);
                uint64_t size;
                uint8_t atom_type = 0;