summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/ideviceinfo.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/ideviceinfo.c b/tools/ideviceinfo.c
index e05165b..c5c060e 100644
--- a/tools/ideviceinfo.c
+++ b/tools/ideviceinfo.c
@@ -160,10 +160,14 @@ static void plist_node_to_string(plist_t node)
case PLIST_DATA:
plist_get_data_val(node, &data, &u);
- s = g_base64_encode((guchar *)data, u);
- free(data);
- printf("%s\n", s);
- g_free(s);
+ if (u > 0) {
+ s = g_base64_encode((guchar *)data, u);
+ free(data);
+ printf("%s\n", s);
+ g_free(s);
+ } else {
+ printf("\n");
+ }
break;
case PLIST_DATE: