]>
git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/third_party/nlohmann-json/test/thirdparty/Fuzzer/test/ShrinkControlFlowTest.cpp
1 // This file is distributed under the University of Illinois Open Source
2 // License. See LICENSE.TXT for details.
4 // Test that we can find the minimal item in the corpus (3 bytes: "FUZ").
11 static volatile int Sink
;
13 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data
, size_t Size
) {
15 memset(Ids
, -1, sizeof(Ids
));
16 for (size_t i
= 0; i
< Size
; i
++)
17 if (Ids
[Data
[i
]] == -1)
19 int F
= Ids
[(unsigned char)'F'];
20 int U
= Ids
[(unsigned char)'U'];
21 int Z
= Ids
[(unsigned char)'Z'];
22 if (F
>= 0 && U
> F
&& Z
> U
) {
24 //fprintf(stderr, "IDS: %d %d %d\n", F, U, Z);