aboutsummaryrefslogtreecommitdiff
path: root/fuzz/fuzz_alg_bytestream.c
blob: 4096c9d9a29f610ee2e198ed8aaab18cb716b85f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "ndpi_api.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  u_int16_t bytes_read;

  /* No memory allocations involved */

  ndpi_bytestream_to_number64(data, size, &bytes_read);
  ndpi_bytestream_dec_or_hex_to_number64(data, size, &bytes_read);
  ntohs_ndpi_bytestream_to_number(data, size, &bytes_read);

  return 0;
}