view compiler-rt/test/fuzzer/UninitializedStrlen.cpp @ 256:7d9b19ec7a62

cbclang output is still wrong
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 18 Aug 2023 18:48:47 +0900
parents 1d019706d866
children
line wrap: on
line source

#include <cstdint>
#include <cstring>

volatile size_t Sink;

extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
  if (Size < 4) return 0;
  if (Data[0] == 'F' && Data[1] == 'U' && Data[2] == 'Z' && Data[3] == 'Z') {
    char uninit[7];
    Sink = strlen(uninit);
  }
  return 0;
}