summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2010-11-27 23:15:26 +0100
committerGravatar Martin Szulecki2011-04-11 19:42:18 +0200
commit2d3e75d205fa0755d99217881c4610f7a2229d94 (patch)
tree9d2facae236981699ea99c2e7a6eced8db742ecf
parent5eefa4828535a905f9af5fd7ea0ad00b2f955103 (diff)
downloadlibimobiledevice-2d3e75d205fa0755d99217881c4610f7a2229d94.tar.gz
libimobiledevice-2d3e75d205fa0755d99217881c4610f7a2229d94.tar.bz2
idevicebackup4: only write PhoneNumber key in Info.plist if present
-rw-r--r--tools/idevicebackup4.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/idevicebackup4.c b/tools/idevicebackup4.c
index c2e067d..1a9a9ea 100644
--- a/tools/idevicebackup4.c
+++ b/tools/idevicebackup4.c
@@ -289,7 +289,9 @@ static plist_t mobilebackup_factory_info_plist_new()
plist_dict_insert_item(ret, "Last Backup Date", plist_new_date(tv.tv_sec, tv.tv_usec));
value_node = plist_dict_get_item(root_node, "PhoneNumber");
- plist_dict_insert_item(ret, "Phone Number", plist_copy(value_node));
+ if (value_node && (plist_get_node_type(value_node) == PLIST_STRING)) {
+ plist_dict_insert_item(ret, "Phone Number", plist_copy(value_node));
+ }
value_node = plist_dict_get_item(root_node, "ProductType");
plist_dict_insert_item(ret, "Product Type", plist_copy(value_node));