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>
release/7.0
Michael Niedermayer 8 months ago
parent 640f35b83e
commit 0e529f8a93
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 3
      libavformat/asfdec_o.c

@ -866,6 +866,9 @@ static int asf_read_simple_index(AVFormatContext *s, const GUIDParseTable *g)
int64_t offset;
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
// the first not indexed video stream
for (i = 0; i < asf->nb_streams; i++) {

Loading…
Cancel
Save