[mythtv-commits] Ticket #5704: avoid potential file race between stat and open in DVDProbe::probe
MythTV
mythtv at cvs.mythtv.org
Sun Sep 7 17:03:43 UTC 2008
#5704: avoid potential file race between stat and open in DVDProbe::probe
---------------------------------------------+------------------------------
Reporter: Erik Hovland <erik at hovland.org> | Owner: ijr
Type: defect | Status: new
Priority: trivial | Milestone: unknown
Component: mythtv | Version: head
Severity: low | Mlocked: 0
---------------------------------------------+------------------------------
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.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/5704>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list