-
fuzzers: avoid use of libgit2 internals in packfile_raw · de53972f
The packfile_raw fuzzer is using some internal APIs from libgit2, which makes it hard to compile it as part of the oss-fuzz project. As oss-fuzz requires us to link against the C++ FuzzingEngine library, we cannot use "-DBUILD_FUZZERS=ON" directly but instead have to first compile an object from our fuzzers and then link against the C++ library. Compiling the fuzzer objects thus requires an external invocation of CC, and we certainly don't want to do further black magic by adding libgit2's private source directory to the header include path. To fix the issue, convert the code to not use any internal APIs. Besides some headers which we have to add now, this also requires us to change to the hashing function of the ODB. Note that this will change the hashing result, as we have previously not prepended the object header to the data that is to be hashed. But this shouldn't matter in practice, as we don't care for the hash value anyway.
Patrick Steinhardt committed
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
corpora/packfile | Loading commit data... | |
CMakeLists.txt | Loading commit data... | |
packfile_fuzzer.c | Loading commit data... | |
standalone_driver.c | Loading commit data... |