Opened 18 years ago
Closed 18 years ago
#5503 closed defect (fixed)
Don't pass negative file descriptors to dup?()
| Reported by: | 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)
Note:
See TracTickets
for help on using tickets.

checks fd before calling dup