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

Closed 10 months ago

Last modified 10 months ago

#11625 closed Patch - Bug Fix (fixed)

Patch to initialize fd_set in MythSystemLegacyIOHandler ctor - fixes coverity 1028698

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

Description

Static analysis detected that the fd_set was not being initialized in the ctor. While correct from a static analysis POV, the structure was being initialized elsewhere before use. To make static analysis happy, initialize the fd_set.

Fixes coverity 1028698

Note that coverity may not properly understand that the use of the provided FD_ZERO macro will properly initialize the structure since on some platforms (i.e. x86) the macro turns into inline assembly code. In the case that adding the patch does not eliminate the coverity issue, one will need to manually acknowledge the defect.

github ref: https://github.com/garybuhrmaster/mythtv/commit/7323bf7a71b42f379f139b57524b82e1ff28d6bc

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

Attachments (0)

Change History (2)

comment:1 Changed 10 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 b37d3cfb35d79ff944c232c142ad4de42f29b5a6/mythtv:

Initialize fd_set in MythSystemLegacyIOHandler ctor

Static analysis detected that the fd_set was not
being initialized in the ctor. While correct
from a static analysis POV, the structure was
being initialized elsewhere before use. To
make static analysis happy, initialize the fd_set.

Fixes coverity 1028698

Note that coverity may not properly understand
that the use of the provided FD_ZERO macro will
properly initialize the structure since on
some platforms (i.e. x86) the macro turns into
inline assembly code. In the case that adding
the patch does not eliminate the coverity issue,
one will need to manually acknowledge the defect.

Fixes #11625.

Signed-off-by: Paul Harrison <pharrison@…>

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.