diff options
author | Martin Szulecki | 2011-03-21 16:17:45 +0100 |
---|---|---|
committer | Martin Szulecki | 2011-03-26 11:54:40 +0100 |
commit | 880fbffd2f1be66a4b63697d7ca2bea46f624841 (patch) | |
tree | 760c5509f66e5c47e7733fb6c1b02ef6cba5146f /src | |
parent | b22e695c5546439035febd29c6fbb06b2ffd29af (diff) | |
download | libimobiledevice-880fbffd2f1be66a4b63697d7ca2bea46f624841.tar.gz libimobiledevice-880fbffd2f1be66a4b63697d7ca2bea46f624841.tar.bz2 |
Due to a bug in iOS 4.3, plist data might contain invalid null characters
The main lockdown plist of iOS 4.3 contains invalid null characters
which we now convert to spaces. Fixes running ideviceinfo on iOS 4.3.
Thanks to teuf for debugging and proposing the fix.
Diffstat (limited to 'src')
-rw-r--r-- | src/property_list_service.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/property_list_service.c b/src/property_list_service.c index 5c6d2bd..8af958e 100644 --- a/src/property_list_service.c +++ b/src/property_list_service.c @@ -245,6 +245,11 @@ 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 */ + for (bytes = 0; bytes < pktlen-1; bytes++) { + if (content[bytes] == 0x0) + content[bytes] = 0x20; + } plist_from_xml(content, pktlen, plist); } if (*plist) { |