Browse Source

avformat/idroqdec: Check chunk_size for being too large

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 744a0b5206)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.0.5
Michael Niedermayer 9 years ago
parent
commit
ff01dbb6ec
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavformat/idroqdec.c

+ 3
- 0
libavformat/idroqdec.c View File

@@ -157,6 +157,9 @@ static int roq_read_packet(AVFormatContext *s,
chunk_size = AV_RL32(&preamble[2]) + RoQ_CHUNK_PREAMBLE_SIZE * 2 +
codebook_size;

if (chunk_size > INT_MAX)
return AVERROR_INVALIDDATA;

/* rewind */
avio_seek(pb, codebook_offset, SEEK_SET);



Loading…
Cancel
Save