This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new ddf350f1a35 libs/libc: support explicit bases up to 36
ddf350f1a35 is described below

commit ddf350f1a35c08f462079895c9115a78d6a4c0c3
Author: hanzhijian <[email protected]>
AuthorDate: Sat Aug 1 14:35:32 2026 +0800

    libs/libc: support explicit bases up to 36
    
    The strto* interfaces document explicit bases in the range 2 through 36, 
and lib_isbasedigit() already supports alphabetic digits through base 36.  
However, lib_checkbase() rejects every explicit base above 26 with EINVAL.
    
    Raise the validation limit to 36 so the conversion interfaces accept the 
full documented range while continuing to reject base 37 and above.
    
    Signed-off-by: hanzhijian <[email protected]>
---
 libs/libc/stdlib/lib_checkbase.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/libc/stdlib/lib_checkbase.c b/libs/libc/stdlib/lib_checkbase.c
index 3c322b67ca4..7ea29dac655 100644
--- a/libs/libc/stdlib/lib_checkbase.c
+++ b/libs/libc/stdlib/lib_checkbase.c
@@ -104,7 +104,7 @@ int lib_checkbase(int base, FAR const char **pptr)
 
   /* Check for incorrect bases. */
 
-  else if (base < 2 || base > 26)
+  else if (base < 2 || base > 36)
     {
       return -1; /* Means incorrect base */
     }

Reply via email to