]> git.sesse.net Git - ffmpeg/commitdiff
avformat/segafilm: Remove outdated check
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 24 Mar 2021 00:21:41 +0000 (01:21 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Sun, 28 Mar 2021 17:09:29 +0000 (19:09 +0200)
The check has been added at a time when the code performed the
multiplication itself instead of deferring it to av_malloc_array()
and when our allocation functions used unsigned instead of size_t.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/segafilm.c

index 1225227138dc347f12fb97d4c696cdda57d5fcc4..675de00ed2a06edbb12acd91c60cd2398e65ce76 100644 (file)
@@ -201,8 +201,6 @@ static int film_read_header(AVFormatContext *s)
         return AVERROR_INVALIDDATA;
     film->base_clock = AV_RB32(&scratch[8]);
     film->sample_count = AV_RB32(&scratch[12]);
-    if(film->sample_count >= UINT_MAX / sizeof(film_sample))
-        return -1;
     film->sample_table = av_malloc_array(film->sample_count, sizeof(film_sample));
     if (!film->sample_table)
         return AVERROR(ENOMEM);