mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-06-06 05:14:45 +00:00
fix(nimble): Added a check for invalid offset
This commit is contained in:
@@ -4228,6 +4228,11 @@ ble_gattc_write_long(uint16_t conn_handle, uint16_t attr_handle,
|
||||
/* The mbuf is consumed by the procedure. */
|
||||
txom = NULL;
|
||||
|
||||
if (proc->write_long.attr.offset > OS_MBUF_PKTLEN(proc->write_long.attr.om)) {
|
||||
rc = BLE_ATT_ERR_INVALID_OFFSET;
|
||||
goto done;
|
||||
}
|
||||
|
||||
ble_gattc_log_write_long(proc);
|
||||
|
||||
rc = ble_gattc_write_long_tx(proc);
|
||||
|
||||
Reference in New Issue
Block a user