GapAdvertisingData::addData() should use > for bounds checking of payload

This commit is contained in:
Rohit Grover 2014-05-29 16:21:46 +01:00
parent 28c1ca8830
commit 6e1746fdba

View file

@ -78,7 +78,7 @@ ble_error_t GapAdvertisingData::addData(DataType advDataType,
/* value is exclusive or not (flags, etc.) */
/* Make sure we don't exceed the 31 byte payload limit */
if (_payloadLen + len + 2 >= GAP_ADVERTISING_DATA_MAX_PAYLOAD) {
if (_payloadLen + len + 2 > GAP_ADVERTISING_DATA_MAX_PAYLOAD) {
return BLE_ERROR_BUFFER_OVERFLOW;
}