mirror of
https://github.com/apache/nuttx.git
synced 2026-05-20 20:44:39 +08:00
can: ctucanfd: initialize CAN message header on receive
The CAN message header was not fully initialized in ctucanfd_chardev_receive(), which could result in uninitialized fields and incorrect message contents being delivered to upper-layer applications. Signed-off-by: zhaohaiyang1 <zhaohaiyang1@xiaomi.com>
This commit is contained in:
@@ -739,6 +739,8 @@ static void ctucanfd_chardev_receive(FAR struct ctucanfd_can_s *priv)
|
||||
uint16_t frc = 0;
|
||||
uint32_t regval = 0;
|
||||
|
||||
memset(&hdr, 0, sizeof(hdr));
|
||||
|
||||
/* Get frame count */
|
||||
|
||||
regval = ctucanfd_getreg(priv, CTUCANFD_RXSETSTAT);
|
||||
|
||||
Reference in New Issue
Block a user