Skip to content

Commit 4598a28

Browse files
committed
Fixed bug that checked the wrong buffer size when inserting UUID information into an advertisement payload.
1 parent 1dbb478 commit 4598a28

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
@@ -498,7 +498,7 @@ ble_error_t AdvertisingDataBuilder::setUUIDData(
498498
size_t old_size = getFieldSize(shortType) + getFieldSize(longType);
499499

500500
/* if we can't fit the new data do not proceed */
501-
if (new_size > data.size() - (_payload_length - old_size)) {
501+
if (new_size > _buffer.size() - (_payload_length - old_size)) {
502502
return BLE_ERROR_BUFFER_OVERFLOW;
503503
}
504504

0 commit comments

Comments
 (0)