libs/libc: support explicit bases up to 36
Some checks are pending
MemBrowse Memory Report / changes-filter (push) Waiting to run
MemBrowse Memory Report / load-targets (push) Waiting to run
MemBrowse Memory Report / identical (push) Blocked by required conditions
MemBrowse Memory Report / analyze (push) Blocked by required conditions

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 <hanzhijian@zepp.com>
This commit is contained in:
hanzhijian 2026-08-01 14:35:32 +08:00 committed by Xiang Xiao
parent 8cec1d01db
commit ddf350f1a3

View file

@ -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 */
}