1 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
2 // See https://llvm.org/LICENSE.txt for license information.
3 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 // Test for libFuzzer's "equivalence" fuzzing, part A.
9 extern "C" void LLVMFuzzerAnnounceOutput(const uint8_t *Data
, size_t Size
);
10 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data
, size_t Size
) {
11 // fprintf(stderr, "A %zd\n", Size);
13 if (Size
> 50) Size
= 50;
14 for (size_t i
= 0; i
< Size
; i
++)
15 Result
[Size
- i
- 1] = Data
[i
];
16 LLVMFuzzerAnnounceOutput(Result
, Size
);