nuttx/libs/libc/stdlib
Peter Bee 1f5786f5ea libc/stdlib: Fix range check in strtoul(l)
The previous implementation of strtoul(l) is flawed. The range check
assumed that when overflow happens, the truncated value is smaller than
the original value. As a counter example, passing "10000000000" to
strtol will not trigger ERANGE, but return a truncated value. This patch
adds more accurate range checks.

Change-Id: I239e034e390b4974157ed6efa17110f2e74904cf
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2020-11-12 06:01:33 -08:00
..
Kconfig
lib_abort.c
lib_abs.c
lib_aligned_alloc.c user-space memalign() must not be called from within the OS. 2020-08-04 22:45:47 +01:00
lib_atof.c libc: Refine the inline handling 2020-07-04 11:10:29 +09:00
lib_atoi.c libc: Refine the inline handling 2020-07-04 11:10:29 +09:00
lib_atol.c libc: Refine the inline handling 2020-07-04 11:10:29 +09:00
lib_atoll.c libc: Refine the inline handling 2020-07-04 11:10:29 +09:00
lib_bsearch.c
lib_checkbase.c
lib_div.c Remove CONFIG_CAN_PASS_STRUCT 2020-04-11 21:19:47 +01:00
lib_Exit.c libc: Refine the inline handling 2020-07-04 11:10:29 +09:00
lib_itoa.c
lib_labs.c
lib_ldiv.c Remove CONFIG_CAN_PASS_STRUCT 2020-04-11 21:19:47 +01:00
lib_llabs.c
lib_lldiv.c Remove CONFIG_CAN_PASS_STRUCT 2020-04-11 21:19:47 +01:00
lib_mblen.c libc: Implement mblen, mbstowcs and wcstombs 2020-06-02 07:13:37 -06:00
lib_mbstowcs.c libc: Implement mblen, mbstowcs and wcstombs 2020-06-02 07:13:37 -06:00
lib_mbtowc.c libc: Implement wcsrtombs, wcsnrtombs and mbsnrtowcs 2020-06-02 07:13:37 -06:00
lib_mkdtemp.c libs/libc/stdlib: Implement mkdtemp(3) syscall 2020-09-19 04:16:14 -07:00
lib_mkstemp.c libs/libc/stdio: correct the prototype of mktemp(3) 2020-09-19 04:16:14 -07:00
lib_mktemp.c libs/libc/stdio: correct the prototype of mktemp(3) 2020-09-19 04:16:14 -07:00
lib_posix_memalign.c libc: Refine the inline handling 2020-07-04 11:10:29 +09:00
lib_ptsname.c
lib_ptsnamer.c
lib_qsort.c
lib_rand.c
lib_realpath.c libc: Replace all malloc/free to lib_malloc/lib_free 2020-07-29 10:14:27 +01:00
lib_srand.c libc: Move double_t typedef from sys/types.h to math.h 2020-06-29 13:37:41 +01:00
lib_stackchk.c stack check: Support Stack Smashing Protector(SSP) 2020-08-18 09:58:21 -07:00
lib_strtod.c
lib_strtof.c
lib_strtol.c
lib_strtold.c
lib_strtoll.c
lib_strtoul.c libc/stdlib: Fix range check in strtoul(l) 2020-11-12 06:01:33 -08:00
lib_strtoull.c libc/stdlib: Fix range check in strtoul(l) 2020-11-12 06:01:33 -08:00
lib_unlockpt.c
lib_wcstombs.c libc: Implement mblen, mbstowcs and wcstombs 2020-06-02 07:13:37 -06:00
lib_wctomb.c
Make.defs libs/libc/stdlib: Implement mkdtemp(3) syscall 2020-09-19 04:16:14 -07:00