mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-12-12 05:24:19 +08:00
obexd: Fix invalid memory read when pulling phone book
Data contacts are freed ones in finalize function which is called in query_result callback function. Calling free_data_contacts(data) twice for last phone book part causes invalid memory read when dereferencing data->contacts.
This commit is contained in:
parent
e37a88400b
commit
16ca8eb265
@ -1154,7 +1154,8 @@ static void send_pull_part(struct phonebook_data *data,
|
||||
data->cb(vcards->str, vcards->len, g_slist_length(data->contacts),
|
||||
data->newmissedcalls, lastpart, data->user_data);
|
||||
|
||||
free_data_contacts(data);
|
||||
if (!lastpart)
|
||||
free_data_contacts(data);
|
||||
g_string_free(vcards, TRUE);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user