Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ossfuzz/zip_read_metadata_fuzzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ static const zip_uint16_t PROBE_IDS[] = {
};
#define N_PROBE_IDS (sizeof(PROBE_IDS) / sizeof(PROBE_IDS[0]))

#ifdef __cplusplus
extern "C" {
#endif

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
zip_source_t *src;
zip_error_t error;
Expand Down Expand Up @@ -127,3 +131,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
}
return 0;
}

#ifdef __cplusplus
}
#endif
8 changes: 8 additions & 0 deletions ossfuzz/zip_write_roundtrip_fuzzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ take(stream_t *s, size_t max, size_t *out_len) {

static const char *PASSWORD = "fuzzpw";

#ifdef __cplusplus
extern "C" {
#endif

int
LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
zip_error_t error;
Expand Down Expand Up @@ -260,3 +264,7 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
zip_source_free(src); /* release keep reference */
return 0;
}

#ifdef __cplusplus
}
#endif