Merge pull request #10638 from AGlass0fMilk/fix-advertising-uuid-bug

Fix AdvertisingDataBuilder UUID Insertion Bug
pull/10646/head
Martin Kojtal 2019-05-23 14:46:49 +01:00 committed by GitHub
commit b3328fdcc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -498,7 +498,7 @@ ble_error_t AdvertisingDataBuilder::setUUIDData(
size_t old_size = getFieldSize(shortType) + getFieldSize(longType);
/* if we can't fit the new data do not proceed */
if (new_size > data.size() - (_payload_length - old_size)) {
if (new_size > _buffer.size() - (_payload_length - old_size)) {
return BLE_ERROR_BUFFER_OVERFLOW;
}