You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avformat/idroqdec: Check chunk_size for being too large
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -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);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user