[mythtv-commits] mythtv commit: r18198 by paulh

mythtv at cvs.mythtv.org mythtv at cvs.mythtv.org
Mon Aug 25 16:29:23 UTC 2008


      Author: paulh
        Date: 2008-08-25 16:29:22 +0000 (Mon, 25 Aug 2008)
New Revision: 18198
   Changeset: http://cvs.mythtv.org/trac/changeset/18198

Modified:

   trunk/mythplugins/mythmusic/mythmusic/cddecoder.cpp
   trunk/mythplugins/mythmusic/mythmusic/cdrip.cpp
   trunk/mythplugins/mythmusic/mythmusic/databasebox.cpp
   trunk/mythplugins/mythmusic/mythmusic/filescanner.cpp
   trunk/mythplugins/mythmusic/mythmusic/main.cpp
   trunk/mythplugins/mythmusic/mythmusic/musicplayer.cpp
   trunk/mythplugins/mythmusic/mythmusic/playlist.cpp
   trunk/mythplugins/mythmusic/mythmusic/smartplaylist.cpp
   trunk/mythplugins/mythmusic/mythmusic/visualize.cpp

Log:

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.




More information about the mythtv-commits mailing list