summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2011-03-31 11:40:41 +0200
committerGravatar Martin Szulecki2011-03-31 11:40:41 +0200
commit430100a50a955fc574f26524ec784b7f39e310b6 (patch)
tree7262acf6bb4ea0f12dedcc0e57ceb376bfb89d6d /src
parent328030119b24951462a95079fd1a268a5ff9f3d0 (diff)
downloadlibimobiledevice-430100a50a955fc574f26524ec784b7f39e310b6.tar.gz
libimobiledevice-430100a50a955fc574f26524ec784b7f39e310b6.tar.bz2
debug: Use explicit size for string when debugging non-null terminated
The debug code to output the device public key was not taking into account that the key data is not null terminated.
Diffstat (limited to 'src')
-rw-r--r--src/lockdown.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lockdown.c b/src/lockdown.c
index 2aba389..935f24e 100644
--- a/src/lockdown.c
+++ b/src/lockdown.c
@@ -850,7 +850,7 @@ static lockdownd_error_t lockdownd_do_pair(lockdownd_client_t client, lockdownd_
debug_info("device refused to send public key.");
return ret;
}
- debug_info("device public key follows:\n%s", public_key.data);
+ debug_info("device public key follows:\n%.*s", public_key.size, public_key.data);
/* get libimobiledevice pair_record */
ret = generate_pair_record_plist(public_key, NULL, &dict_record);
if (ret != LOCKDOWN_E_SUCCESS) {