about summary refs log tree commit diff
path: root/examples/aflpp_driver/aflpp_driver_test.cpp
blob: 81aa9db4c6900b734f287079b00a7571a22e086d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {

  fprintf(stderr, "Received size %lu\n", Size);
  
  if (Size < 4)
    return 0;

  if (Data[0] == 'F')
    if (Data[1] == 'A')
      if (Data[2] == '$')
        if (Data[3] == '$')
          abort();
          
  return 0;

}