llvm-project/libc
Alfonso Gregory 0784e62c3c [libc] Fix strtok_r crash when src and *saveptr are both nullptr
While working and testing my refactoring of multiple string functions in libc, I came across a bug that needs to be addressed in a patch on its own: src is checked for nullptr and assigned to *saveptr if it is nullptr. However, saveptr is initially nullptr when it comes to reentry. This could cause a problem if both saveptr and src are null; we need to do the check first and return nullptr if both are nullptr.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D106885
2021-07-27 21:49:23 +00:00
..
AOR_v20.02 Harmonize Python shebang 2020-07-16 21:53:45 +02:00
benchmarks [libc] update benchmark distributions 2021-07-13 09:59:25 +00:00
cmake/modules [libc] Enable MPFR library for math functions test 2021-07-27 20:40:04 +00:00
config [libc] Fix x86_64 fenv implementation for windows 2021-07-27 20:53:01 +00:00
docs [libc] Add documentation for clang-tidy checks. 2020-07-06 18:15:35 -07:00
fuzzing [libc] Remove libc-fuzzer as a dependency to check-libc. 2021-06-10 05:06:03 +00:00
include [libc][NFC][Obvious] Add a missing dep. 2021-01-18 22:04:20 -08:00
lib [libc] add scudo wrappers to llvm libc 2021-07-26 17:24:52 +00:00
loader [libc] Normalize LIBC_TARGET_MACHINE 2021-05-05 15:52:42 +00:00
spec [libc] Add implementation of expm1f. 2021-06-10 14:58:34 -04:00
src [libc] Fix strtok_r crash when src and *saveptr are both nullptr 2021-07-27 21:49:23 +00:00
test [libc] Fix strtok_r crash when src and *saveptr are both nullptr 2021-07-27 21:49:23 +00:00
utils [libc] Fix x86_64 fenv implementation for windows 2021-07-27 20:53:01 +00:00
CMakeLists.txt [libc] Enable MPFR library for math functions test 2021-07-27 20:40:04 +00:00
LICENSE.TXT Rename top-level LICENSE.txt files to LICENSE.TXT 2021-03-10 21:26:24 -08:00
README.txt

README.txt

LLVM libc
=========

This directory and its subdirectories contain source code for llvm-libc,
a retargetable implementation of the C standard library.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.