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


##########
net/inet/inet_sockif.c:
##########
@@ -1856,6 +1857,13 @@ static ssize_t inet_sendmsg(FAR struct socket *psock,
   end = &msg->msg_iov[msg->msg_iovlen];
   for (len = 0, iov = msg->msg_iov; iov != end; iov++)
     {
+      /* The sum of the iov_len values must fit in an ssize_t */
+
+      if (iov->iov_len > SSIZE_MAX - len)
+        {

Review Comment:
   Done.



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