[FFmpeg-cvslog] segafilm: Error out on impossible packet size
Luca Barbato
git at videolan.org
Wed Aug 14 12:30:19 CEST 2013
ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Tue Aug 13 07:40:38 2013 +0200| [5268bd2900effa59b51e0fede61aacde5e2f0b95] | committer: Luca Barbato
segafilm: Error out on impossible packet size
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5268bd2900effa59b51e0fede61aacde5e2f0b95
---
libavformat/segafilm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c
index 068d432..adf2475 100644
--- a/libavformat/segafilm.c
+++ b/libavformat/segafilm.c
@@ -214,6 +214,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;
More information about the ffmpeg-cvslog
mailing list