-
Committer:
Luiz Augusto von Dentz
-
Author(s):
Sebastian Urban
-
Date:
2021-06-14 20:59:46 UTC
-
Revision ID:
git-v1:297fa5cb3e5b16cbf9be5015a0d770bd3f9ce735
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.