From: Andre Noll Date: Wed, 11 Aug 2021 19:12:13 +0000 (+0200) Subject: mp4: Don't store the stsd entry count. X-Git-Tag: v0.7.1~7^2~95 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=16eb10820a9e434334b17748abd69933d9ff37bd;p=paraslash.git mp4: Don't store the stsd entry count. A local variable in read_stsd() will do as well. --- diff --git a/mp4.c b/mp4.c index 9c8e4188..0834b03d 100644 --- 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;