From d61b5044c7f83ef55b155f90612e0a5d35348e38 Mon Sep 17 00:00:00 2001 From: David Engel Date: Wed, 19 Jun 2013 13:30:43 -0500 Subject: [PATCH] Protect against divide by zero in CommDetector2. Fixes coverity 746808. --- mythtv/programs/mythcommflag/CommDetector2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mythtv/programs/mythcommflag/CommDetector2.cpp b/mythtv/programs/mythcommflag/CommDetector2.cpp index 002ac40885b..a763be22f0c 100644 --- a/mythtv/programs/mythcommflag/CommDetector2.cpp +++ b/mythtv/programs/mythcommflag/CommDetector2.cpp @@ -645,7 +645,7 @@ bool CommDetector2::go(void) *currentPass, finishedAnalyzers, deadAnalyzers, currentFrame, currentFrameNumber); - if (((currentFrameNumber >= 1) && + if (((currentFrameNumber >= 1) && (nframes > 0) && (((nextFrame * 10) / nframes) != ((currentFrameNumber * 10) / nframes))) || (nextFrame >= nframes))