xiaoxiang781216 commented on code in PR #16827:
URL: https://github.com/apache/nuttx/pull/16827#discussion_r2268374068


##########
drivers/timers/capture.c:
##########
@@ -472,17 +472,34 @@ int cap_register_multiple(FAR const char *devpath,
                           FAR struct cap_lowerhalf_s **lower,
                           int n)
 {
-  char fullpath[16];
+  char fullpath[32];
   int ret;
 
-  if (n < 1)
+  if (!devpath || !lower || n < 1)
     {
       return -EINVAL;
     }
 
+  size_t devlen = strlen(devpath);
+  if (devlen == 0 || devlen > sizeof(fullpath) - 2)

Review Comment:
   remove, the check from line 491 is enough



-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to