diff --git a/fuzzing/Android.bp b/fuzzing/Android.bp index a9c27e3..09b1f4a 100644 --- a/fuzzing/Android.bp +++ b/fuzzing/Android.bp @@ -6,7 +6,7 @@ package { cc_fuzz { name: "libfdt_fuzzer", srcs: [ - "libfdt_fuzzer.cpp", + "libfdt_fuzzer.c", ], static_libs: [ "libfdt", diff --git a/fuzzing/libfdt_fuzzer.cpp b/fuzzing/libfdt_fuzzer.c similarity index 94% rename from fuzzing/libfdt_fuzzer.cpp rename to fuzzing/libfdt_fuzzer.c index 64ecc33..227e711 100644 --- a/fuzzing/libfdt_fuzzer.cpp +++ b/fuzzing/libfdt_fuzzer.c @@ -29,7 +29,7 @@ void walk_device_tree(const void *device_tree, int parent_node) { // Information on device tree is available in external/dtc/Documentation/ // folder. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { +int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { // Non-zero return values are reserved for future use. if (size < FDT_V17_SIZE) return 0; @@ -39,4 +39,4 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { walk_device_tree(data, root_node_offset); return 0; -} \ No newline at end of file +}