mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 16:47:28 +01:00
Edit fuzz' .c files to be C, not C++
This commit is contained in:
1 parent
5ad9055572
commit
2a97a1ad29
4 files changed
+16
-8
No files matched your search
@@ -28,7 +28,11 @@ void intentional_segfault() {
|
||||
|
||||
void fuzz(wuffs_base__io_reader src_reader, uint32_t hash);
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
// Hash input as per https://en.wikipedia.org/wiki/Jenkins_hash_function
|
||||
size_t i = 0;
|
||||
uint32_t hash = 0;
|
||||
@@ -50,6 +54,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#ifdef WUFFS_CONFIG__FUZZLIB_MAIN
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
Reference in new issue
Block a user