STM32 USB device. Add protection in the event that out-of-bound enpoint numbers are received. From David Sidrane.
This commit is contained in:
parent
0577a54d18
commit
def19bad48
@ -3124,6 +3124,9 @@ static inline void stm32_rxinterrupt(FAR struct stm32_usbdev_s *priv)
|
||||
/* Decode status fields */
|
||||
|
||||
epphy = (regval & OTGFS_GRXSTSD_EPNUM_MASK) >> OTGFS_GRXSTSD_EPNUM_SHIFT;
|
||||
|
||||
if (epphy < STM32_NENDPOINTS)
|
||||
{
|
||||
privep = &priv->epout[epphy];
|
||||
|
||||
/* Handle the RX event according to the packet status field */
|
||||
@ -3251,6 +3254,7 @@ static inline void stm32_rxinterrupt(FAR struct stm32_usbdev_s *priv)
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Enable the Rx Status Queue Level interrupt */
|
||||
|
||||
|
@ -3124,6 +3124,9 @@ static inline void stm32_rxinterrupt(FAR struct stm32_usbdev_s *priv)
|
||||
/* Decode status fields */
|
||||
|
||||
epphy = (regval & OTGHS_GRXSTSD_EPNUM_MASK) >> OTGHS_GRXSTSD_EPNUM_SHIFT;
|
||||
|
||||
if (epphy < STM32_NENDPOINTS)
|
||||
{
|
||||
privep = &priv->epout[epphy];
|
||||
|
||||
/* Handle the RX event according to the packet status field */
|
||||
@ -3251,6 +3254,7 @@ static inline void stm32_rxinterrupt(FAR struct stm32_usbdev_s *priv)
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Enable the Rx Status Queue Level interrupt */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user