diff options
author | Raquel Medina <raquel.medina@konsulko.com> | 2020-10-21 13:20:34 +0200 |
---|---|---|
committer | Raquel Medina <raquel.medina@konsulko.com> | 2020-10-26 13:30:44 +0100 |
commit | bdcd1fe42febb04e1be428bdfa022f89b65a1cb1 (patch) | |
tree | 739091f4a4857d57b48e0a20fc6a6e7fc7bc5381 /binding | |
parent | 512c2dc6df87fff1fca05d791bb28a5b3faa2586 (diff) |
fix history segfault following transport disconnectneedlefish_13.93.0needlefish/13.93.0marlin_12.93.0marlin_12.92.0marlin_12.91.0marlin_12.90.1marlin_12.90.0marlin/12.93.0marlin/12.92.0marlin/12.91.0marlin/12.90.1marlin/12.90.0lamprey_11.92.0lamprey_11.91.0lamprey/11.92.0lamprey/11.91.0koi_10.93.0koi_10.92.0koi_10.91.0koi/10.93.0koi/10.92.0koi/10.91.013.93.012.93.012.92.012.91.012.90.112.90.011.92.011.91.010.93.010.92.010.91.0
The segmentation fault manifests if the remote
disconnects pbap transport followed by a refresh
pbap data operation.
The root cause is a read operation of
vcard data for the calls history, ignoring the error
triggered while attempting to access the
corresponding file on the remote device.
The current patch introduces the missing check for
errors.
SPEC-3652
Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
Change-Id: I916ba5b8b5fc29aa9b928dbf2ed3e7c892d15891
test & deleteme
Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
Change-Id: I9efa151af54ae87cbf7e67bb6b985a76e0814549
Diffstat (limited to 'binding')
-rw-r--r-- | binding/bluetooth-pbap-binding.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/binding/bluetooth-pbap-binding.c b/binding/bluetooth-pbap-binding.c index 1ff6e82..ccfbb7c 100644 --- a/binding/bluetooth-pbap-binding.c +++ b/binding/bluetooth-pbap-binding.c @@ -473,8 +473,15 @@ void history(afb_req_t request) if (!parse_max_entries_parameter(request, &max_entries)) return; - org_bluez_obex_phonebook_access1_call_select_sync( - phonebook, INTERNAL, list, NULL, NULL); + if (!phonebook) + return; + + if (!org_bluez_obex_phonebook_access1_call_select_sync( + phonebook, INTERNAL, COMBINED, NULL, NULL)) { + afb_req_fail(request, "cannot import call history", NULL); + return; + } + jresp = get_vcards(max_entries); afb_req_success(request, jresp, "call history"); |