xiaoxiang781216 commented on a change in pull request #5823: URL: https://github.com/apache/incubator-nuttx/pull/5823#discussion_r832795936
########## File path: fs/rpmsgfs/rpmsgfs_client.c ########## @@ -740,8 +741,8 @@ int rpmsgfs_client_rename(FAR void *handle, FAR const char *oldpath, DEBUGASSERT(len <= space); - strcpy(msg->pathname, oldpath); - strcpy(msg->pathname + oldlen, newpath); + memcpy(msg->pathname, oldpath, oldlen); + memcpy(msg->pathname + oldlen, newpath, newlen); Review comment: Yes, since this format can avoid the rpmsgfs server copy the oldpath temporally to append the NUL terminator. -- 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