summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2012-01-20 00:18:42 +0100
committerGravatar Martin Szulecki2012-03-22 18:53:57 +0100
commita6be9013acc0f3f2ab37b703798e76409a1c7253 (patch)
treea0f50f14a1ee6aafd315463bf2b3f0f069d3ac21 /src
parentb83f925e58d4e8b89d042c0f375045a94bb0b202 (diff)
downloadlibimobiledevice-a6be9013acc0f3f2ab37b703798e76409a1c7253.tar.gz
libimobiledevice-a6be9013acc0f3f2ab37b703798e76409a1c7253.tar.bz2
fix invalid characters in xml plists
Diffstat (limited to 'src')
-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 8af958e..6b2a198 100644
--- a/src/property_list_service.c
+++ b/src/property_list_service.c
@@ -245,9 +245,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);