Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-14 14:22:20 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-08-14 14:25:51 +0400
commitab06436dbff52efb8b46f857b0412f987ea83370 (patch)
tree822469d23340b40072d2b10350ad7021929ea351 /libavformat/segafilm.c
parent070c22d53a2bbd35e332770056b3d2e44a573bf3 (diff)
parent5268bd2900effa59b51e0fede61aacde5e2f0b95 (diff)
Merge commit '5268bd2900effa59b51e0fede61aacde5e2f0b95'
* commit '5268bd2900effa59b51e0fede61aacde5e2f0b95': segafilm: Error out on impossible packet size Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/segafilm.c')
-rw-r--r--libavformat/segafilm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c
index a33ad858f5..232a93117f 100644
--- a/libavformat/segafilm.c
+++ b/libavformat/segafilm.c
@@ -215,6 +215,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;