commit 85c2e33de5ee8fe1facc21d5be3ac61e900c56f8
Author: Christophe Fergeau <[email protected]>
Date: Sun Jul 17 08:38:33 2011 +0200
don't crash on NULL in itdb_sysinfo_properties_free
If the passed in pointer is NULL, itdb_sysinfo_properties_free
will attempt to dereference it which will cause a crash. This crash
was triggered by the udev callout code if
itdb_sysinfo_extended_parse_from_xml returned NULL. This happened
for example with an iPod Shuffle 4G which returned "" in answer
to the USB inquiry command.
src/itdb_sysinfo_extended_parser.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/itdb_sysinfo_extended_parser.c
b/src/itdb_sysinfo_extended_parser.c
index 9ac09f3..cc09c49 100644
--- a/src/itdb_sysinfo_extended_parser.c
+++ b/src/itdb_sysinfo_extended_parser.c
@@ -324,6 +324,7 @@ static void free_image_format (Itdb_ArtworkFormat *format)
void itdb_sysinfo_properties_free (SysInfoIpodProperties *props)
{
+ g_return_if_fail (props != NULL);
g_list_foreach (props->artwork_formats, (GFunc)free_image_format, NULL);
g_list_free (props->artwork_formats);
g_list_foreach (props->photo_formats, (GFunc)free_image_format, NULL);
------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide. Store less, Store more with what you own, Move data to
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2