Skip to content

Commit 23e39a1

Browse files
committed
Fix capacity check when service data are added to BLE advertising payload.
1 parent c7759fe commit 23e39a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

features/FEATURE_BLE/source/gap/AdvertisingDataBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ ble_error_t AdvertisingDataBuilder::setServiceData(
256256
);
257257

258258
/* if we can't fit the new data do not proceed */
259-
if (total_size > data.size() - (_payload_length - old_size)) {
259+
if (total_size > (_buffer.size() - (_payload_length - old_size))) {
260260
return BLE_ERROR_BUFFER_OVERFLOW;
261261
}
262262

0 commit comments

Comments
 (0)