You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-06-14 08:44:40 +02:00
avformat/mov: Limit maximum box size for mov_read_lhvc()
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
This commit is contained in:
+3
-1
@@ -8683,8 +8683,10 @@ static int mov_read_lhvc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||
// TODO: handle lhvC when present before hvcC
|
||||
return 0;
|
||||
|
||||
if (atom.size < 6 || st->codecpar->extradata_size < 23)
|
||||
if (atom.size < 6 || st->codecpar->extradata_size < 23 ||
|
||||
atom.size > INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE) {
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
buf = av_malloc(atom.size + AV_INPUT_BUFFER_PADDING_SIZE);
|
||||
if (!buf)
|
||||
|
||||
Reference in New Issue
Block a user