]> git.sesse.net Git - ffmpeg/commitdiff
avformat/mpegts: Increase pcr_incr width to 64bit
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 18 Dec 2020 23:22:01 +0000 (00:22 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 21 Dec 2020 23:30:50 +0000 (00:30 +0100)
Fixes: division by zero
Fixes: 26459/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGTSRAW_fuzzer-5666350112178176
Fixes: 28154/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGTSRAW_fuzzer-5195728439476224
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/mpegts.c

index 7549fc91c933eb0045911ce6000c73ca50cc401b..1122455f661ba5728f03674f7c68c366bba9b8b5 100644 (file)
@@ -135,7 +135,7 @@ struct MpegTSContext {
     int fix_teletext_pts;
 
     int64_t cur_pcr;    /**< used to estimate the exact PCR */
-    int pcr_incr;       /**< used to estimate the exact PCR */
+    int64_t pcr_incr;   /**< used to estimate the exact PCR */
 
     /* data needed to handle file based ts */
     /** stop parsing loop */