/*1* *****************************************************************************2*3* SPDX-License-Identifier: BSD-2-Clause4*5* Copyright (c) 2018-2025 Gavin D. Howard and contributors.6*7* Redistribution and use in source and binary forms, with or without8* modification, are permitted provided that the following conditions are met:9*10* * Redistributions of source code must retain the above copyright notice, this11* list of conditions and the following disclaimer.12*13* * Redistributions in binary form must reproduce the above copyright notice,14* this list of conditions and the following disclaimer in the documentation15* and/or other materials provided with the distribution.16*17* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"18* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE19* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE20* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE21* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR22* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF23* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS24* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN25* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)26* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE27* POSSIBILITY OF SUCH DAMAGE.28*29* *****************************************************************************30*31* Declarations for the OSS-Fuzz build of bc and dc.32*33*/3435#include <stdint.h>36#include <stdlib.h>3738#ifndef BC_OSSFUZZ_H39#define BC_OSSFUZZ_H4041/// The number of args in fuzzer arguments, including the NULL terminator.42extern const size_t bc_fuzzer_args_len;4344/// The standard arguments for the bc fuzzer with the -c argument.45extern const char* bc_fuzzer_args_c[];4647/// The standard arguments for the bc fuzzer with the -C argument.48extern const char* bc_fuzzer_args_C[];4950/// The standard arguments for the dc fuzzer with the -c argument.51extern const char* dc_fuzzer_args_c[];5253/// The standard arguments for the dc fuzzer with the -C argument.54extern const char* dc_fuzzer_args_C[];5556/// The data pointer.57extern uint8_t* bc_fuzzer_data;5859/**60* The function that the fuzzer runs.61* @param Data The data.62* @param Size The number of bytes in @a Data.63* @return 0 on success, -1 on error.64* @pre @a Data must not be equal to NULL if @a Size > 0.65*/66int67LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size);6869/**70* The initialization function for the fuzzer.71* @param argc A pointer to the argument count.72* @param argv A pointer to the argument list.73* @return 0 on success, -1 on error.74*/75int76LLVMFuzzerInitialize(int* argc, char*** argv);7778#endif // BC_OSSFUZZ_H798081