Commit 744a0b52 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/idroqdec: Check chunk_size for being too large

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 9e9c2276
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment