You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gu...@apache.org on 2021/09/01 17:35:27 UTC
[incubator-nuttx] branch master updated: libc/gettext: Initialize
path field when creating mofile struct.
This is an automated email from the ASF dual-hosted git repository.
gustavonihei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 5941532 libc/gettext: Initialize path field when creating mofile struct.
5941532 is described below
commit 5941532fb504b66e32e1a96c14361c785753833a
Author: Neo Xu <xu...@xiaomi.com>
AuthorDate: Tue Aug 31 16:43:20 2021 +0800
libc/gettext: Initialize path field when creating mofile struct.
Signed-off-by: Xu Xingliang <xu...@xiaomi.com>
---
libs/libc/locale/lib_gettext.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libs/libc/locale/lib_gettext.c b/libs/libc/locale/lib_gettext.c
index 4115c22..52b8f0f 100644
--- a/libs/libc/locale/lib_gettext.c
+++ b/libs/libc/locale/lib_gettext.c
@@ -312,6 +312,7 @@ FAR char *dcngettext(FAR const char *domainname,
return notrans;
}
+ strlcpy(mofile->path, path, PATH_MAX);
mofile->map = momap(path, &mofile->size);
if (mofile->map == MAP_FAILED)
{