mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-23 13:19:54 +00:00
21 lines
392 B
C
21 lines
392 B
C
#include <stdio.h>
|
|
#include <r_core.h>
|
|
|
|
int LLVMFuzzerInitialize(int *lf_argc, char ***lf_argv) {
|
|
r_log_set_quiet (true);
|
|
return 0;
|
|
}
|
|
|
|
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
|
RCore *r = r_core_new();
|
|
|
|
r_core_cmdf (r, "o malloc://%zu", Size);
|
|
r_io_write_at (r->io, 0, Data, Size);
|
|
|
|
r_core_cmd0 (r, "oba 0");
|
|
r_core_cmd0 (r, "ia");
|
|
|
|
r_core_free (r);
|
|
return 0;
|
|
}
|