Opened 5 years ago

Closed 5 years ago

#12230 closed Patch - Bug Fix (Fixed)

Patch to protected against potential divide by zero. Cppcheck detected

Reported by: Gary Buhrmaster <gary.buhrmaster@…> Owned by: stuartm
Priority: minor Milestone: 0.28
Component: MythTV - Mythcommflag Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Cppcheck detected a possible divide by zero in CommDetector2. Protect against it (nframes == 0), and the other potential divide by zero case (npasses == 1) just for completeness.

github ref: https://github.com/garybuhrmaster/mythtv/commit/f95ec0d11fe3283e852c7c3bee735b123e497184 github git-am ref: https://github.com/garybuhrmaster/mythtv/commit/f95ec0d11fe3283e852c7c3bee735b123e497184.patch

Change History (4)

comment:1 Changed 5 years ago by stuartm

Milestone: unknown0.28
Owner: changed from cpinkham to stuartm
Status: newaccepted

comment:2 Changed 5 years ago by stuartm

Coverity reports a related divide by zero at ln 661.

comment:3 Changed 5 years ago by stuartm

Patch applied in [7692306eb]

comment:4 Changed 5 years ago by stuartm

Resolution: Fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.