diff --git a/libr/core/cmd_anal.c b/libr/core/cmd_anal.c index b0901788c9..f3adb6dda6 100644 --- a/libr/core/cmd_anal.c +++ b/libr/core/cmd_anal.c @@ -3271,7 +3271,7 @@ static int cmd_afbplus(RCore *core, const char *input) { fcnaddr = r_num_math (core->num, r_str_word_get0 (ptr, 0)); } fcn = r_anal_get_function_at (core->anal, fcnaddr); - if (fcn) { + if (fcn && size > 0) { if (!r_anal_function_add_bb (core->anal, fcn, addr, size, jump, fail, diff)) { R_LOG_ERROR ("afb+: Cannot add basic block at 0x%08"PFMT64x" with size %d", addr, (int)size); } diff --git a/libr/core/yank.c b/libr/core/yank.c index bdb5d5cc7f..4d26477afc 100644 --- a/libr/core/yank.c +++ b/libr/core/yank.c @@ -384,6 +384,7 @@ R_API int r_core_yank_hud_path(RCore *core, const char *input, int dir) { R_API void r_core_yank_unset(RCore *core) { r_buf_free (core->yank_buf); + core->yank_buf = NULL; core->yank_addr = UT64_MAX; } diff --git a/test/fuzz/fuzz_bin2.c b/test/fuzz/fuzz_bin2.c index 980b4bc830..7435dd1081 100644 --- a/test/fuzz/fuzz_bin2.c +++ b/test/fuzz/fuzz_bin2.c @@ -17,8 +17,8 @@ static void usage() { int LLVMFuzzerInitialize(int *lf_argc, char ***lf_argv) { r_sys_clearenv (); - r_sandbox_enable (true); - r_sandbox_grain (R_SANDBOX_GRAIN_NONE); + // r_sandbox_enable (true); + // r_sandbox_grain (R_SANDBOX_GRAIN_NONE); r_log_set_quiet (true); int argc = *lf_argc; diff --git a/test/fuzz/fuzz_cmd.c b/test/fuzz/fuzz_cmd.c index e40ec38746..f4ef1c8611 100644 --- a/test/fuzz/fuzz_cmd.c +++ b/test/fuzz/fuzz_cmd.c @@ -9,13 +9,14 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { if (Size < 1) { return 0; } - RCore *r = r_core_new(); + RCore *r = r_core_new (); if (Size < 1) { return 0; } - r_core_cmdf (r, "o malloc://%zu", Size); - r_io_write_at (r->io, 0, Data, Size); + // r_core_cmdf (r, "o malloc://%zu", Size); + // r_io_write_at (r->io, 0, Data, Size); + r_core_cmd0 (r, "o /bin/ls"); char *cmd = r_str_ndup ((const char *)Data, Size); if (cmd) {