shared/gatt-server: Fix heap overflow when appending prepare writes
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 8 Jun 2021 23:46:49 +0000 (16:46 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:38 +0000 (19:08 +0530)
commit63137fd54075adae2f65309ee0aea0087c0d972d
tree6d4d316567a24427db2682db05e4a7f9b818d055
parent8b7b720cdca830425e9067aae836e417a1ed23dd
shared/gatt-server: Fix heap overflow when appending prepare writes

The code shall check if the prepare writes would append more the
allowed maximum attribute length.

Fixes https://github.com/bluez/bluez/security/advisories/GHSA-479m-xcq5-9g2q

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
src/shared/gatt-server.c