Skip to content

Commit

Permalink
Add static asset check for ble service data size
Browse files Browse the repository at this point in the history
  • Loading branch information
praveenCY committed Jan 17, 2022
1 parent 5553eb3 commit 6df954f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/platform/P6/BLEManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,8 @@ void BLEManagerImpl::SetAdvertisingData(void)
uint8_t service_data[BLE_SERVICE_DATA_SIZE];
uint8_t * p = service_data;

static_assert(BLE_SERVICE_DATA_SIZE == sizeof(ChipBLEDeviceIdentificationInfo) + 2, "BLE Service Data Size is incorrect");

// Initialize the CHIP BLE Device Identification Information block that will be sent as payload
// within the BLE service advertisement data.
err = ConfigurationMgr().GetBLEDeviceIdentificationInfo(mDeviceIdInfo);
Expand Down

0 comments on commit 6df954f

Please sign in to comment.