Opened 17 years ago
Closed 17 years ago
#5704 closed defect (fixed)
avoid potential file race between stat and open in DVDProbe::probe
| Reported by: | Owned by: | Anduin Withers | |
|---|---|---|---|
| Priority: | trivial | Milestone: | unknown |
| Component: | mythvideo | Version: | head |
| Severity: | low | Keywords: | |
| Cc: | Ticket locked: | no |
Description
when using stat before any file action function (open, unlink, etc) there is the possibility for a race. Because both functions use strings that represent file names. So it makes more sense to either do the action first and deal with the error state or to try to use alternatives like Qt's QFile object. I chose the later in the attached patch.
Attachments (2)
Change History (6)
by , 17 years ago
| Attachment: | mythvideo-file-race.patch added |
|---|
comment:2 by , 17 years ago
| Component: | mythtv → mythvideo |
|---|---|
| Owner: | changed from to |
comment:3 by , 17 years ago
| Status: | new → assigned |
|---|
by , 17 years ago
| Attachment: | mythplugins_mythvideo-file-race.patch added |
|---|
Latest version of the patch against trunk as of 2008-12-06
Note:
See TracTickets
for help on using tickets.

changes DVDProbe::probe to use QFile instead of stat and open.