summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2012-01-20 00:18:42 +0100
committerGravatar Martin Szulecki2012-03-19 01:45:47 +0100
commitabfdd2d2c2a0ba4236d90fba1dffe50e99ae5829 (patch)
tree092b83f67db9630e11e56e88a1dba864f009e3dc
parent055fabdeaa8afcbe905aeb30d5c945f286aecb6a (diff)
downloadlibimobiledevice-abfdd2d2c2a0ba4236d90fba1dffe50e99ae5829.tar.gz
libimobiledevice-abfdd2d2c2a0ba4236d90fba1dffe50e99ae5829.tar.bz2
fix invalid characters in xml plists
-rw-r--r--src/property_list_service.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/property_list_service.c b/src/property_list_service.c
index 2a15be5..8634864 100644
--- a/src/property_list_service.c
+++ b/src/property_list_service.c
@@ -248,9 +248,9 @@ static property_list_service_error_t internal_plist_receive_timeout(property_lis
if (!memcmp(content, "bplist00", 8)) {
plist_from_bin(content, pktlen, plist);
} else {
- /* iOS 4.3 hack: plist data might contain invalid null characters, thus we convert those to spaces */
+ /* iOS 4.3+ hack: plist data might contain invalid characters, thus we convert those to spaces */
for (bytes = 0; bytes < pktlen-1; bytes++) {
- if (content[bytes] == 0x0)
+ if ((content[bytes] < 0x20) && (content[bytes] != 0x09) && (content[bytes] != 0x0a) && (content[bytes] != 0x0d))
content[bytes] = 0x20;
}
plist_from_xml(content, pktlen, plist);