You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "pkarashchenko (via GitHub)" <gi...@apache.org> on 2023/08/11 23:22:03 UTC

[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #10160: Fix error: '%s' directive output may be truncated

pkarashchenko commented on code in PR #10160:
URL: https://github.com/apache/nuttx/pull/10160#discussion_r1291859538


##########
drivers/ioexpander/gpio.c:
##########
@@ -691,7 +691,7 @@ int gpio_pin_unregister(FAR struct gpio_dev_s *dev, int minor)
 int gpio_pin_unregister_byname(FAR struct gpio_dev_s *dev,
                                FAR const char *pinname)
 {
-  char devname[32];
+  char devname[64];

Review Comment:
   I do not see how this should help. Maybe `snprintf(devname, sizeof(devname) - 5, "/dev/%s", pinname);` instead or `snprintf(devname, sizeof(devname) - sizeof("/dev/") - 1, "/dev/%s", pinname);`?



-- 
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-unsubscribe@nuttx.apache.org

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