acassis commented on code in PR #3059: URL: https://github.com/apache/nuttx-apps/pull/3059#discussion_r2046698164
########## canutils/slcan/slcan.c: ########## @@ -316,9 +316,22 @@ int main(int argc, char *argv[]) { /* open CAN interface */ - mode = 1; - debug_print("Open interface\n"); - ok_return(fd); + struct ifreq ifr; + + strlcpy(ifr.ifr_name, argv[1], IFNAMSIZ); + Review Comment: Please include the null termination here too. It will protect in cases where users pass a longer name than IFNAMSIZ. -- 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