From 5d4faaaf45e20015313661f9fd71dc59da31576a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Rymanowski?= Date: Fri, 22 Mar 2019 14:24:27 +0100 Subject: [PATCH] nimble/l2cap: Fix handling receiving big l2cap coc mtu If L2CAP CoC MTU was bigger then available msys block, Nimble would fail here. Also this pullup is some leftover which is not needed as below code does not really use direct access to om_data besides checking SDU lenght which is 2 bytes long --- nimble/host/src/ble_l2cap_coc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nimble/host/src/ble_l2cap_coc.c b/nimble/host/src/ble_l2cap_coc.c index 61345f5af..5e5fa8b30 100644 --- a/nimble/host/src/ble_l2cap_coc.c +++ b/nimble/host/src/ble_l2cap_coc.c @@ -147,7 +147,7 @@ ble_l2cap_coc_rx_fn(struct ble_l2cap_chan *chan) rx = &chan->coc_rx; om_total = OS_MBUF_PKTLEN(*om); - rc = ble_hs_mbuf_pullup_base(om, om_total); + rc = ble_hs_mbuf_pullup_base(om, BLE_L2CAP_SDU_SIZE); if (rc != 0) { return rc; }