Commit ff01dbb6 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>
(cherry picked from commit 744a0b52)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 2caee485
...@@ -157,6 +157,9 @@ static int roq_read_packet(AVFormatContext *s, ...@@ -157,6 +157,9 @@ static int roq_read_packet(AVFormatContext *s,
chunk_size = AV_RL32(&preamble[2]) + RoQ_CHUNK_PREAMBLE_SIZE * 2 + chunk_size = AV_RL32(&preamble[2]) + RoQ_CHUNK_PREAMBLE_SIZE * 2 +
codebook_size; codebook_size;
if (chunk_size > INT_MAX)
return AVERROR_INVALIDDATA;
/* rewind */ /* rewind */
avio_seek(pb, codebook_offset, SEEK_SET); 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