diff options
author | Martin Szulecki | 2011-03-31 11:40:41 +0200 |
---|---|---|
committer | Martin Szulecki | 2012-03-22 18:47:08 +0100 |
commit | 489cdad395a0518392c504a99fff01cf112b2c0d (patch) | |
tree | 386205bce904a319e552eedb0775554e470b7468 | |
parent | b0ffdc392d5b3bfefc604e43679003b3e65ed5e4 (diff) | |
download | libimobiledevice-489cdad395a0518392c504a99fff01cf112b2c0d.tar.gz libimobiledevice-489cdad395a0518392c504a99fff01cf112b2c0d.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.
-rw-r--r-- | src/lockdown.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lockdown.c b/src/lockdown.c index 83fced2..1764a87 100644 --- a/src/lockdown.c +++ b/src/lockdown.c @@ -853,7 +853,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) { |