yamt commented on code in PR #14898:
URL: https://github.com/apache/nuttx/pull/14898#discussion_r1897119026


##########
drivers/serial/serial.c:
##########
@@ -1363,12 +1418,18 @@ static ssize_t uart_write(FAR struct file *filep, FAR 
const char *buffer,
 #endif
 
       flags = enter_critical_section();
-      ret = uart_irqwrite(dev, buffer, buflen);
+      ret = uart_irqwritev(dev, uio);
       leave_critical_section(flags);
 
       return ret;
     }
 
+  buflen = nwritten = uio_resid(uio);
+  if (nwritten < 0)

Review Comment:
   because user-given iovecs can contain more than SSIZE_MAX.
   the apis like readv can't handle that large requests.
   



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