Parent: d31dfe8c7d51746c5a03d73f2b90da40c739bb7c
Author: Sebastian Urban <surban@surban.net>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2021-06-14 23:59:46
Tree: b2dbeeffddd7605bf1d48c33bbe51dcee1f4511c
gatt-server: Flush notify multiple buffer when full and fix overflow This fixes the calculation of available buffer space in bt_gatt_server_send_notification and sends pending notifications immediately when there is no more room to add a notification. Previously there was a buffer overflow caused by incorrect calculation of available buffer space: data->offset can equal data->len from a previous call to this function, leading (data->len - data->offset) to underflow after data->offset += 2.
Diffstat
| M | src/shared/gatt-server.c | | | 43 | ++++++++++++++++++++++++++++++++++++- - - - - - - |
1 files changed, 36 insertions(+), 7 deletions(-)