Opened 16 years ago

Closed 16 years ago

#5503 closed defect (fixed)

Don't pass negative file descriptors to dup?()

Reported by: Erik Hovland <erik@…> Owned by: Isaac Richards
Priority: trivial Milestone: unknown
Component: mythtv Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

In libs/libmythui/mythsystem.cpp /dev/null is opened and then dup2'ed. If open gave -1, then the check would not be sufficient to stop giving a bogus file descriptor to dup, which is bad.

Since very bad things have to be happening for open() to return a -1 for opening /dev/null I am marking this ticket as trivial. But it is a pretty easy fix.

Attachments (1)

libs_libmythui-dont-pass-neg-to-dup.patch (967 bytes) - added by Erik Hovland <erik@…> 16 years ago.
checks fd before calling dup

Download all attachments as: .zip

Change History (2)

Changed 16 years ago by Erik Hovland <erik@…>

checks fd before calling dup

comment:1 Changed 16 years ago by danielk

Resolution: fixed
Status: newclosed

(In [18175]) Fixes #5503. Check file open and dup2 for error returns in myth_system.

Note: See TracTickets for help on using tickets.