raiden00pl commented on code in PR #19139:
URL: https://github.com/apache/nuttx/pull/19139#discussion_r3409746212


##########
drivers/can/ctucanfd_pci.c:
##########
@@ -760,6 +760,14 @@ static void ctucanfd_chardev_receive(FAR struct 
ctucanfd_can_s *priv)
 
       buff[0] = ctucanfd_getreg(priv, CTUCANFD_RXDATA);
 
+      /* buff[0] populated the frame->fmt.rwcnt. Check before use. */
+
+      if (frame->fmt.rwcnt > sizeof(buff) / sizeof(buff[0]))

Review Comment:
   what about socket can version ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to