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 11 months ago

#11550 closed Patch - Bug Fix (fixed)

Patch for static analysis detected array index undefined in dvdringbuf.cpp

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

Description

Static analysis (scan-build) detected a potential code path that would result in calling guess_palette with the palette array not having been initialized, and indexing m_clut with an undefined value. This patch initializes the arrays.

https://github.com/garybuhrmaster/mythtv/commit/824013456f41f4c90daa1f1a3879a1c9e06c28c5

Attachments (0)

Change History (4)

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

btw, this patch also fixes the static analysis detected alpha value (potentially) being uninitialized and passed to guess_palette, where it is used in a calculation.

comment:2 Changed 11 months ago by Gary Buhrmaster <gary.buhrmaster@…>

  • Owner set to Gary Buhrmaster <gary.buhrmaster@…>
  • Resolution set to fixed
  • Status changed from new to closed

In b578a5e6444ee5d04c00387d233ab79ddba691a3/mythtv:

Check the return code from setsockopt (in lirc.cpp)

Static analysis (coverity) identified that the return code
from setsockopt was not checked. This patch checks the
return code, with a log message if the setting fails.
(cherry picked from commit 0ae45b8598110898f4779f3bdc826e1ce5abb005)

Signed-off-by: Stuart Morgan <smorgan@…>

Fixes #11550

comment:3 Changed 11 months ago by stuartm

  • Milestone changed from unknown to 0.27
  • Resolution fixed deleted
  • Status changed from closed to new

comment:4 Changed 11 months ago by Gary Buhrmaster <gary.buhrmaster@…>

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

In ab1f79a25ae33a0451a197bd3733767a2591dbfc/mythtv:

Fix static analysis detected error regarding undefined array index in dvdringbuf.cpp

Static analysis (scan-build) detected a potential code path such that guess_palette
could be called without having the palette variables initialized, which would result
in indexing m_clut with an undefined value.
(cherry picked from commit 824013456f41f4c90daa1f1a3879a1c9e06c28c5)

Signed-off-by: Stuart Morgan <smorgan@…>

Fixes #11550

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.