//===-- strtointeger_fuzz.cpp ---------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// /// /// Fuzzing test for llvm-libc atof implementation. /// //===----------------------------------------------------------------------===// #include "src/stdlib/atoi.h" #include "src/stdlib/atol.h" #include "src/stdlib/atoll.h" #include "src/stdlib/strtol.h" #include "src/stdlib/strtoll.h" #include "src/stdlib/strtoul.h" #include "src/stdlib/strtoull.h" #include <stddef.h> #include <stdint.h> // This takes the randomized bytes in data and interprets the first byte as the // base for the string to integer conversion and the rest of them as a string to // be passed to the string to integer conversion. extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { … }