From patchwork Sat Jun 29 22:30:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 13762 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id E4C01448F85 for ; Sun, 30 Jun 2019 01:32:18 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C595168AA49; Sun, 30 Jun 2019 01:32:18 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe08-2.mx.upcmail.net (vie01a-dmta-pe08-2.mx.upcmail.net [84.116.36.21]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4256E689EED for ; Sun, 30 Jun 2019 01:32:12 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe08.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1hhLtD-0009QU-3E for ffmpeg-devel@ffmpeg.org; Sun, 30 Jun 2019 00:32:11 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id hLsFhZQlF5D5NhLsFh6vXM; Sun, 30 Jun 2019 00:31:11 +0200 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.41.20 X-CNFS-Analysis: v=2.3 cv=bu8y+3Si c=1 sm=1 tr=0 a=I1eytVlZLDX1BM2VTtTtSw==:117 a=I1eytVlZLDX1BM2VTtTtSw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=nZOtpAppAAAA:20 a=QE-J6WRmeqY-VXDkRYcA:9 a=1fhp2MxaeJtTNGEnv6mo:22 a=pHzHmUro8NiASowvMSCR:22 a=Ew2E2A-JSTLzCXPT_086:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 30 Jun 2019 00:30:16 +0200 Message-Id: <20190629223016.25649-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190629223016.25649-1-michael@niedermayer.cc> References: <20190629223016.25649-1-michael@niedermayer.cc> MIME-Version: 1.0 X-CMAE-Envelope: MS4wfF9VQuexu1tCYDXzr62xJMM++1i2ttCEvakrYfs6HHgY1BpiGQDTzv9MGIHMdlR7YVB7oPoxeow9mo3UmO3KxSEYp6lvjZdSEWH6mxbQhRkE7JaYpZ7a 8dAAKx3ER3kr3/GD5xhnY67/J5PCG57X2gBwlvzUflbiJZh5135+S61j Subject: [FFmpeg-devel] [PATCH 2/2] avformat/utils: Check timebase before use in estimate_timings() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Fixes: division by 0 Fixes: 15480/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5746727434321920 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index 3d764c18d6..28583a55ef 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2953,6 +2953,7 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset) AVStream av_unused *st; for (i = 0; i < ic->nb_streams; i++) { st = ic->streams[i]; + if (st->time_base.den) av_log(ic, AV_LOG_TRACE, "stream %d: start_time: %0.3f duration: %0.3f\n", i, (double) st->start_time * av_q2d(st->time_base), (double) st->duration * av_q2d(st->time_base));