Module: libav Branch: release/0.8 Commit: 896baaaad85c402db187c1c81ececc3a9624dbc1
Author: Luca Barbato <lu_z...@gentoo.org> Committer: Sean McGovern <gsean...@gmail.com> Date: Tue Aug 13 07:40:38 2013 +0200 segafilm: Error out on impossible packet size Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-sta...@libav.org (cherry picked from commit 5268bd2900effa59b51e0fede61aacde5e2f0b95) Signed-off-by: Luca Barbato <lu_z...@gentoo.org> --- libavformat/segafilm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c index 5c346a7..5279121 100644 --- a/libavformat/segafilm.c +++ b/libavformat/segafilm.c @@ -210,6 +210,8 @@ static int film_read_header(AVFormatContext *s, film->sample_table[i].sample_offset = data_offset + AV_RB32(&scratch[0]); film->sample_table[i].sample_size = AV_RB32(&scratch[4]); + if (film->sample_table[i].sample_size > INT_MAX / 4) + return AVERROR_INVALIDDATA; if (AV_RB32(&scratch[8]) == 0xFFFFFFFF) { film->sample_table[i].stream = film->audio_stream_index; film->sample_table[i].pts = audio_frame_counter; _______________________________________________ libav-commits mailing list libav-commits@libav.org https://lists.libav.org/mailman/listinfo/libav-commits