summaryrefslogtreecommitdiff
path: root/libavformat/segafilm.c
diff options
context:
space:
mode:
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 9e94de103c..3f752a1d9b 100644
--- a/libavformat/segafilm.c
+++ b/libavformat/segafilm.c
@@ -171,6 +171,8 @@ static int film_read_header(AVFormatContext *s,
return AVERROR_INVALIDDATA;
film->base_clock = BE_32(&scratch[8]);
film->sample_count = BE_32(&scratch[12]);
+ if(film->sample_count >= UINT_MAX / sizeof(film_sample_t))
+ return -1;
film->sample_table = av_malloc(film->sample_count * sizeof(film_sample_t));
for(i=0; i<s->nb_streams; i++)