diff options
author | Nikias Bassen | 2014-08-06 23:14:17 +0200 |
---|---|---|
committer | Nikias Bassen | 2014-08-06 23:14:17 +0200 |
commit | 778256cf50e44da36f4bbf6ee01abb0486a4418f (patch) | |
tree | 77035a6d0dfada4a5ec92675184f10427fcbfaf4 | |
parent | 191186a39cd3d31235f43db63c94d1b206131f1d (diff) | |
download | libimobiledevice-778256cf50e44da36f4bbf6ee01abb0486a4418f.tar.gz libimobiledevice-778256cf50e44da36f4bbf6ee01abb0486a4418f.tar.bz2 |
lockdown: Only set SystemBUID in pair_record_generate() if it actually contains a value
This will prevent a crash in libplist when plist_new_string() will be called with
a NULL pointer.
-rw-r--r-- | src/lockdown.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lockdown.c b/src/lockdown.c index 3e2fe06..c6efb16 100644 --- a/src/lockdown.c +++ b/src/lockdown.c @@ -743,7 +743,8 @@ static lockdownd_error_t pair_record_generate(lockdownd_client_t client, plist_t } /* set SystemBUID */ - if (userpref_read_system_buid(&system_buid)) { + userpref_read_system_buid(&system_buid); + if (system_buid) { plist_dict_set_item(*pair_record, USERPREF_SYSTEM_BUID_KEY, plist_new_string(system_buid)); } |