Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 11 months ago

Closed 10 months ago

Last modified 10 months 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

Attachments (0)

Change History (2)

comment:1 Changed 10 months ago by Gary Buhrmaster <gary.buhrmaster@…>

  • Resolution set to fixed
  • Status changed from new to closed

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 10 months ago by paulh

  • Milestone changed from unknown to 0.27

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.