Ejemplo n.º 1
0
static void
pre_fuzz_cb(generic_func_t target_pc, void *fuzzcxt, void **user_data)
{
    ptr_uint_t arg_value;
    if (drfuzz_get_arg(target_pc, 0, false/*cur*/, (void **)&arg_value) != DRMF_SUCCESS)
        DR_ASSERT_MSG(false, "drfuzz failed to get arg");
    arg_value = (arg_value + 1);
    if (drfuzz_set_arg(fuzzcxt, 0, (void *)arg_value) != DRMF_SUCCESS)
        DR_ASSERT_MSG(false, "drfuzz failed to set arg");
}
Ejemplo n.º 2
0
static void
pre_fuzz_cb(void *fuzzcxt, generic_func_t target_pc, dr_mcontext_t *mc)
{
    ptr_uint_t arg_value;

    if (drfuzz_get_arg(fuzzcxt, target_pc, 0, false/*cur*/,
                       (void **) &arg_value) != DRMF_SUCCESS)
        EXPECT(false, "drfuzz failed to get arg");
    arg_value = (arg_value + 1);
    if (drfuzz_set_arg(fuzzcxt, 0, (void *)arg_value) != DRMF_SUCCESS)
        EXPECT(false, "drfuzz failed to set arg");
}