[mythtv-commits] Ticket #5567: mythmusic defects
MythTV
mythtv at cvs.mythtv.org
Mon Aug 25 16:29:24 UTC 2008
#5567: mythmusic defects
---------------------------------------------+------------------------------
Reporter: Erik Hovland <erik at hovland.org> | Owner: paulh
Type: defect | Status: closed
Priority: minor | Milestone: 0.22
Component: mythmusic | Version: head
Severity: low | Resolution: fixed
Mlocked: 0 |
---------------------------------------------+------------------------------
Changes (by paulh):
* status: assigned => closed
* resolution: => fixed
Comment:
(In [18198]) Various MythMusic defect fixes from Erik Hovland. Fixes
#5567.
1. By moving the 'return 0;' inside the cpp clause an unreachable defect
is not
triggered.
2. If a parent isn't found then ripTrack could be leaked.
3. item declaration hides the item parameter in the member function.
4. Declaration of outfile hides parameter in ctor.
5. Since the else clause guarantees that the function will end the second
'return -1;' is not necessary. If the else clause is just moved to the
end and the extra return removed it has the same effect.
6. Using sprintf with getenv is dangerous and could cause the string to be
overflowed. Use Qt's QDir::home() function to get the home directory
instead.
7. m_decoder is the wrong pointer to check. The one to check is the one
given
by the dyn cast.
8. else return missing from conditional clause. Without it there then node
could
be dereferenced even though it is invalid (and a segfault could
happen).
9. tmpdata might be null and then dereferenced when getting album and
artist.
10. Use of tmpnam is dangerous. Using createTempFile from libmyth.
11. PLField might be null. Dereferencing it could end in segfault.
12. Assignment of item in do/while loop is unnecessary.
13. Removal of dead code.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/5567#comment:2>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list