Skip to content

Commit

Permalink
Protect against divide by zero in CommDetector2.
Browse files Browse the repository at this point in the history
Fixes coverity 746808.
  • Loading branch information
gigem committed Jun 19, 2013
1 parent 76b7dd5 commit d61b504
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mythtv/programs/mythcommflag/CommDetector2.cpp
Expand Up @@ -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))
Expand Down

0 comments on commit d61b504

Please sign in to comment.