]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mpc8.c
Merge commit '0ec1642b60a5b1a4d913e2b9e3899173dff77e7a'
[ffmpeg] / libavformat / mpc8.c
index 56ed7ade13ea9edec7fe12bb953c7f49c06d0c8d..191f6963de47cbdc4292c01720e6e66b93acbafb 100644 (file)
@@ -145,6 +145,10 @@ static void mpc8_parse_seektable(AVFormatContext *s, int64_t off)
         av_log(s, AV_LOG_ERROR, "No seek table at given position\n");
         return;
     }
+    if (size > INT_MAX/10 || size<=0) {
+        av_log(s, AV_LOG_ERROR, "Seek table size is invalid\n");
+        return;
+    }
     if(!(buf = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE)))
         return;
     avio_read(s->pb, buf, size);