File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
connectivity/FEATURE_BLE/libraries/cordio_stack/ble-host/sources/hci/dual_chip Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -2471,6 +2471,11 @@ void hciEvtProcessCmdCmpl(uint8_t *p, uint8_t len)
24712471 uint8_t cbackEvt = 0 ;
24722472 hciEvtCback_t cback = hciCb .evtCback ;
24732473
2474+ if (len > 3 )
2475+ {
2476+ return ;
2477+ }
2478+
24742479 BSTREAM_TO_UINT8 (numPkts , p );
24752480 BSTREAM_TO_UINT16 (opcode , p );
24762481
@@ -2684,7 +2689,7 @@ void hciEvtProcessCmdCmpl(uint8_t *p, uint8_t len)
26842689 if (cbackEvt == HCI_UNHANDLED_CMD_CMPL_CBACK_EVT ) {
26852690 const uint8_t structSize = sizeof (hciUnhandledCmdCmplEvt_t ) - 1 /* removing the fake 1-byte array */ ;
26862691 const uint8_t remainingLen = len - 3 /* we already read opcode and numPkts */ ;
2687- const uint8_t msgSize = structSize + remainingLen ;
2692+ const uint16_t msgSize = structSize + remainingLen ;
26882693
26892694 pMsg = WsfBufAlloc (msgSize );
26902695 if (pMsg != NULL ) {
You can’t perform that action at this time.
0 commit comments