1 // Copyright 2016 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifdef UNSAFE_BUFFERS_BUILD 6 // TODO(crbug.com/351564777): Remove this and convert code to safer constructs. 7 #pragma allow_unsafe_buffers 8 #endif 9 10 #include <stddef.h> 11 #include <stdint.h> 12 13 #include "base/containers/span.h" 14 #include "base/hash/hash.h" 15 16 // Entry point for LibFuzzer. LLVMFuzzerTestOneInput(const uint8_t * data,size_t size)17extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 18 base::PersistentHash(base::span(data, size)); 19 base::FastHash(base::span(data, size)); 20 return 0; 21 } 22