Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#11610 closed Patch - Bug Fix (fixed)

Patch to check fcntl success in mythsystemunix.cpp - fixes coverity 1028691

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

Description

Static analysis (coverity) detected that the system call fcntl in mythsystemunix.cpp did not check its return value. This patch adds in that check.

This patch also implements the more robust setting of the fd flags (get the current flags, or'ing in the NONBLOCK value, and then setting the flags). This is the "correct" way to set flags per the docs (even though in this case it is probably overkill).

Fixes coverity 1028691

github patch: https://github.com/garybuhrmaster/mythtv/commit/26472f379970d6be81c77e8d2f311dccfd25ad47

github git-am patch: https://github.com/garybuhrmaster/mythtv/commit/26472f379970d6be81c77e8d2f311dccfd25ad47.patch

Change History (4)

comment:1 Changed 11 years ago by paulh

Milestone: unknown0.27

comment:2 Changed 11 years ago by stuartm

Milestone: 0.270.27.1

comment:3 Changed 10 years ago by Gary Buhrmaster <gary.buhrmaster@…>

Resolution: fixed
Status: newclosed

In 246c40737794963306bacfb6960008ad23eb7ebc/mythtv:

Patch to check for fcntl success

Static analysis (coverity) detected that the
system call fcntl did not check its return
value. This patch adds in that check.

This patch also implements a more robust setting
of the fd flags (get the current flags, or'ing in
the NONBLOCK value, and then setting the flags).

Fixes coverity 1028691
Fixes #11610

comment:4 Changed 10 years ago by Karl Egly

Milestone: 0.27.10.28
Owner: changed from beirdo to Karl Egly
Note: See TracTickets for help on using tickets.