Fix capacity check when service data are added to BLE advertising payload.

pull/13035/head
Vincent Coubard 2020-05-29 15:06:38 +01:00
parent c7759fe505
commit 23e39a1dbd
1 changed files with 1 additions and 1 deletions

View File

@ -256,7 +256,7 @@ ble_error_t AdvertisingDataBuilder::setServiceData(
); );
/* if we can't fit the new data do not proceed */ /* if we can't fit the new data do not proceed */
if (total_size > data.size() - (_payload_length - old_size)) { if (total_size > (_buffer.size() - (_payload_length - old_size))) {
return BLE_ERROR_BUFFER_OVERFLOW; return BLE_ERROR_BUFFER_OVERFLOW;
} }