1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avformat/asfdec_o: Check size of index object

We subtract 24 so it must be at least 24

Fixes: CID1604482 Overflowed constant

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 891bc070f0)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-07-11 17:38:08 +02:00
parent d63a35fcf1
commit f32f82b421
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -864,6 +864,9 @@ static int asf_read_simple_index(AVFormatContext *s, const GUIDParseTable *g)
int64_t offset; int64_t offset;
uint64_t size = avio_rl64(pb); uint64_t size = avio_rl64(pb);
if (size < 24)
return AVERROR_INVALIDDATA;
// simple index objects should be ordered by stream number, this loop tries to find // simple index objects should be ordered by stream number, this loop tries to find
// the first not indexed video stream // the first not indexed video stream
for (i = 0; i < asf->nb_streams; i++) { for (i = 0; i < asf->nb_streams; i++) {