mirror of
https://github.com/QuasarApp/LIEF.git
synced 2025-04-26 20:34:32 +00:00
API Changes: LIEF::MachO::Parser won't return a 'std::vector' of MachO::Binary* but a pointer to MachO::FatBinary object It's a kind of wrapper on std::vector<MachO::Binary*>
15 lines
433 B
C++
15 lines
433 B
C++
#include <LIEF/LIEF.hpp>
|
|
#include <vector>
|
|
#include <memory>
|
|
|
|
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
|
std::vector<uint8_t> raw = {data, data + size};
|
|
std::unique_ptr<LIEF::MachO::FatBinary> binaries;
|
|
try {
|
|
binaries = std::unique_ptr<LIEF::MachO::FatBinary>(LIEF::MachO::Parser::parse(raw));
|
|
} catch (const LIEF::exception& e) {
|
|
std::cout << e.what() << std::endl;
|
|
}
|
|
return 0;
|
|
}
|