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/12/13 19:30:11 UTC

[GitHub] [incubator-nuttx] pkarashchenko opened a new pull request #4994: libc/textdomain: Fix error behaviour

pkarashchenko opened a new pull request #4994:
URL: https://github.com/apache/incubator-nuttx/pull/4994


   ## Summary
   - `textdomain` should set `errno` to `ENOMEM` in case of error
   - fix buffer overflow in `textdomain` if `domainname` is a string of `NAME_MAX` length
   - improve `textdomain` error detection in case if `domainname` points to non null terminated buffer
   - fix `gettextdomain` for case if `LIBC_LOCALE` is disabled
   
   ## Impact
   
   ## Testing
   
   


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



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #4994: libc/textdomain: Fix error behaviour

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #4994:
URL: https://github.com/apache/incubator-nuttx/pull/4994#discussion_r768289142



##########
File path: libs/libc/locale/lib_gettext.c
##########
@@ -76,7 +76,7 @@ static FAR const char *g_catname[] =
 static sem_t g_sem = SEM_INITIALIZER(1);
 static FAR struct mofile_s *g_mofile;
 
-#ifdef CONFIG_BUILD_KERNEL
+#if defined(CONFIG_BUILD_KERNEL) || !defined(CONFIG_LIBC_LOCALE)

Review comment:
       @pkarashchenko it doesn't make sense to check CONFIG_LIBC_LOCALE since lib_gettext.c already bypass in Make.defs:
   https://github.com/apache/incubator-nuttx/blob/master/libs/libc/locale/Make.defs#L21




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



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #4994: libc/textdomain: Fix error behaviour

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #4994:
URL: https://github.com/apache/incubator-nuttx/pull/4994


   


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



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #4994: libc/textdomain: Fix error behaviour

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #4994:
URL: https://github.com/apache/incubator-nuttx/pull/4994#issuecomment-993240893


   LGTM.


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



[GitHub] [incubator-nuttx] pkarashchenko commented on a change in pull request #4994: libc/textdomain: Fix error behaviour

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on a change in pull request #4994:
URL: https://github.com/apache/incubator-nuttx/pull/4994#discussion_r768339212



##########
File path: libs/libc/locale/lib_gettext.c
##########
@@ -76,7 +76,7 @@ static FAR const char *g_catname[] =
 static sem_t g_sem = SEM_INITIALIZER(1);
 static FAR struct mofile_s *g_mofile;
 
-#ifdef CONFIG_BUILD_KERNEL
+#if defined(CONFIG_BUILD_KERNEL) || !defined(CONFIG_LIBC_LOCALE)

Review comment:
       Oops. I missed that. Will revert this part of the change




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