Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#11587 closed Patch - Bug Fix (fixed)

Proposed patch for ClassicCommDetector.cpp for possible division by zero - fixes coverity 746805

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

Description

This (proposed) patch needs to be carefully looked at by someone with commercial detection expertise, and presumably access to a good set of sample content so that any changes can be evaluated.

There is a feasible (although I believe very unlikely) code path where no pixels will be checked, resulting in a number of variables not being appropriately set, which could result in a divide by zero (and a some other questionable calculations). This code will bypass the code block if no pixels were checked.

Fixes coverity 746805 (possible division by zero)

Patch: https://github.com/garybuhrmaster/mythtv/commit/ef86c95b382eeb295c1eb1f291ad4bd088e731d9.patch

Change History (2)

comment:1 Changed 5 years ago by Gary Buhrmaster <gary.buhrmaster@…>

Resolution: fixed
Status: newclosed

In c753154cebb04f29d974d6aa6a8f228275086211/mythtv:

[PATCH] Patch to bypass code when no pixels checked

There is a feasible (although I believe very unlikely)
code path where no pixels will be checked, resulting
in a number of variables not being appropriately
set. This code will bypass the codes if no pixels
were checked.

Fixes coverity 746805 (possible division by zero)

Fixes #11587.

Signed-off-by: Chris Pinkham <cpinkham@…>

I have looked at the code and can see no negative effects if we
skip the blank frame section and letter/pillar-box detection code
in the unlikely event that we didn't check any pixels. If we did
not check any pixels, there are numerous variables within this
section of code which are meaningless preventing valid detection.

comment:2 Changed 5 years ago by paulh

Milestone: unknown0.27
Note: See TracTickets for help on using tickets.