From: <jc...@us...> - 2007-08-18 08:11:24
|
Revision: 1685 http://gtkpod.svn.sourceforge.net/gtkpod/?rev=1685&view=rev Author: jcsjcs Date: 2007-08-18 01:11:26 -0700 (Sat, 18 Aug 2007) Log Message: ----------- * src/itdb_artwork.c (itdb_thumb_get_filename): check returnvalue of strchr(). Thanks to Javier Kohen. Modified Paths: -------------- libgpod/trunk/ChangeLog libgpod/trunk/src/itdb_artwork.c Modified: libgpod/trunk/ChangeLog =================================================================== --- libgpod/trunk/ChangeLog 2007-08-18 06:38:49 UTC (rev 1684) +++ libgpod/trunk/ChangeLog 2007-08-18 08:11:26 UTC (rev 1685) @@ -15,7 +15,9 @@ * src/itdb_itunesdb (itdb_parse): don't call ipod_parse_artwork_db() if iTunesDB was not read successfully. - + * src/itdb_artwork.c (itdb_thumb_get_filename): check + returnvalue of strchr(). Thanks to Javier Kohen. + 2007-08-07 Nicholas Piper <nicholas at users.sourceforge.net> * bindings/python/gpod.i.in: Return an integer for time_t (note, Modified: libgpod/trunk/src/itdb_artwork.c =================================================================== --- libgpod/trunk/src/itdb_artwork.c 2007-08-18 06:38:49 UTC (rev 1684) +++ libgpod/trunk/src/itdb_artwork.c 2007-08-18 08:11:26 UTC (rev 1685) @@ -1,4 +1,4 @@ -/* Time-stamp: <2007-03-21 17:30:57 jcs> +/* Time-stamp: <2007-08-18 16:22:17 jcs> | | Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net> | Part of the gtkpod project. @@ -413,7 +413,11 @@ if (artwork_dir) { - filename = itdb_get_path (artwork_dir, strchr( thumb->filename+1, ':') + 1); + const gchar *name_on_disk = strchr( thumb->filename+1, ':'); + if (name_on_disk) + { + filename = itdb_get_path (artwork_dir, name_on_disk + 1); + } g_free (artwork_dir); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |