You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/09/01 09:51:34 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #4456: libc/gettext: Initialize path field when creating mofile struct.

xiaoxiang781216 commented on a change in pull request #4456:
URL: https://github.com/apache/incubator-nuttx/pull/4456#discussion_r700059840



##########
File path: libs/libc/locale/lib_gettext.c
##########
@@ -312,6 +312,7 @@ FAR char *dcngettext(FAR const char *domainname,
           return notrans;
         }
 
+      strncpy(mofile->path, path, PATH_MAX);

Review comment:
       strlcpy is better than stncpy since strncpy will set the whole unused space to zero.




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