fix conflicts

This commit is contained in:
Andrea Fioraldi
2020-06-03 11:41:30 +02:00
13 changed files with 89 additions and 63 deletions

View File

@ -17,8 +17,8 @@ void afl_qemu_driver_stdin_input(void) {
}
int main(int argc, char **argv) {
if (LLVMFuzzerInitialize)
LLVMFuzzerInitialize(&argc, &argv);
if (LLVMFuzzerInitialize) LLVMFuzzerInitialize(&argc, &argv);
// Do any other expensive one-time initialization here.
if (getenv("AFL_QEMU_DRIVER_NO_HOOK")) {
@ -33,4 +33,6 @@ int main(int argc, char **argv) {
}
return 0;
}

View File

@ -7,9 +7,9 @@
#define REGS_RSI 6
void afl_persistent_hook(uint64_t *regs, uint64_t guest_base,
uint8_t* input_buf, uint32_t input_len) {
uint8_t *input_buf, uint32_t input_len) {
memcpy(g2h(regs[REGS_RDI]), input_buf, input_len);
memcpy(g2h(regs[REGS_RDI]), input_buf, input_len);
regs[REGS_RSI] = input_len;
}
@ -19,3 +19,4 @@ int afl_persistent_hook_init(void) {
return 1;
}