Skip to content

Commit 0affb73

Browse files
Fix bounds check using a define instead of table size. The bounds check was incorrectly picking a define that wasn't even the last in the table. It now uses the size of the table.
1 parent c7759fe commit 0affb73

File tree

1 file changed

+1
-1
lines changed
  • features/FEATURE_BLE/targets/TARGET_CORDIO/stack/ble-host/sources/stack/dm

1 file changed

+1
-1
lines changed

features/FEATURE_BLE/targets/TARGET_CORDIO/stack/ble-host/sources/stack/dm/dm_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ dmCb_t dmCb;
230230
/*************************************************************************************************/
231231
static void dmHciEvtCback(hciEvt_t *pEvent)
232232
{
233-
WSF_ASSERT(pEvent->hdr.event <= HCI_LE_READ_ANTENNA_INFO_CMD_CMPL_CBACK_EVT);
233+
WSF_ASSERT(pEvent->hdr.event < sizeof(dmHciToIdTbl));
234234

235235
/* if DM not resetting or resetting but incoming event is HCI reset sequence complete event */
236236
if (!dmCb.resetting || (pEvent->hdr.event == HCI_RESET_SEQ_CMPL_CBACK_EVT))

0 commit comments

Comments
 (0)