1c5f01b2fSopenharmony_ci// This file is distributed under the University of Illinois Open Source
2c5f01b2fSopenharmony_ci// License. See LICENSE.TXT for details.
3c5f01b2fSopenharmony_ci
4c5f01b2fSopenharmony_ci// abs(x) < 0 and y == Const puzzle.
5c5f01b2fSopenharmony_ci#include <cstring>
6c5f01b2fSopenharmony_ci#include <cstdint>
7c5f01b2fSopenharmony_ci#include <cstdlib>
8c5f01b2fSopenharmony_ci#include <cstddef>
9c5f01b2fSopenharmony_ci#include <cstdio>
10c5f01b2fSopenharmony_ci
11c5f01b2fSopenharmony_ciextern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
12c5f01b2fSopenharmony_ci  if (Size < 8) return 0;
13c5f01b2fSopenharmony_ci  int x;
14c5f01b2fSopenharmony_ci  unsigned y;
15c5f01b2fSopenharmony_ci  memcpy(&x, Data, sizeof(x));
16c5f01b2fSopenharmony_ci  memcpy(&y, Data + sizeof(x), sizeof(y));
17c5f01b2fSopenharmony_ci  if (abs(x) < 0 && y == 0xbaddcafe) {
18c5f01b2fSopenharmony_ci    printf("BINGO; Found the target, exiting; x = 0x%x y 0x%x\n", x, y);
19c5f01b2fSopenharmony_ci    exit(1);
20c5f01b2fSopenharmony_ci  }
21c5f01b2fSopenharmony_ci  return 0;
22c5f01b2fSopenharmony_ci}
23c5f01b2fSopenharmony_ci
24