mirror of
https://github.com/apache/nuttx.git
synced 2026-10-07 06:15:20 +00: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:
parent
24651af90c
commit
eee0d813a2
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue