casaroli commented on code in PR #20702:
URL: https://github.com/apache/nuttx/pull/20702#discussion_r4437001523


##########
net/can/can_sendmsg_buffered.c:
##########
@@ -214,19 +216,33 @@ ssize_t can_sendmsg(FAR struct socket *psock, FAR const 
struct msghdr *msg,
       return -ENODEV;
     }
 
+  if (msg->msg_iovlen == 0)
+    {
+      return -EMSGSIZE;
+    }
+
+  for (i = 0; i < msg->msg_iovlen; i++)
+    {
+      if (msg->msg_iov[i].iov_len > CANFD_MTU - total_len)

Review Comment:
   No defconfig enables `CONFIG_NET_CAN_WRITE_BUFFERS`, so CI does not compile 
this file, and the sim:can run uses can_sendmsg.c. The new 
`iob_copyin_iov()`/`iob_trycopyin_iov()` path did not run in any test.
   
   Fix: add a sim:can run with `CONFIG_NET_CAN_WRITE_BUFFERS=y` (a send 
gathered from several iovs) to the Testing section.



-- 
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