commit 42e25fa5984d2f8b485cc50788c83fb23fa80eaa
Author: Christophe Fergeau <[email protected]>
Date: Sun Jul 17 09:04:06 2011 +0200
udev: handle invalid XML files read from devices
The generic callout code doesn't check the return of
itdb_sysinfo_extended_parse_from_xml which can be NULL if XML
parsing failed. If this happens, make sure we don't blindly try
to go on.
tools/generic-callout.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/tools/generic-callout.c b/tools/generic-callout.c
index 1408132..73b016f 100644
--- a/tools/generic-callout.c
+++ b/tools/generic-callout.c
@@ -677,6 +677,9 @@ int itdb_callout_set_ipod_properties (ItdbBackend *backend,
const char *dev,
return -1;
}
props = itdb_sysinfo_extended_parse_from_xml (xml, NULL);
+ if (props == NULL) {
+ return -1;
+ }
ipod_set_properties (backend, props);
itdb_sysinfo_properties_free (props);
------------------------------------------------------------------------------
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