From b5ea277900d3f9aeae0ab15aa65c525955540a36 Mon Sep 17 00:00:00 2001 From: Adrian Herrera Date: Tue, 22 Mar 2016 22:32:59 +1100 Subject: [PATCH 1/2] Fixed minor typos --- samples/sample_x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/sample_x86.c b/samples/sample_x86.c index 264015f2..bc290de4 100644 --- a/samples/sample_x86.c +++ b/samples/sample_x86.c @@ -470,7 +470,7 @@ static void test_i386_invalid_mem_read(void) uc_close(uc); } -// emulate code that read invalid memory +// emulate code that write invalid memory static void test_i386_invalid_mem_write(void) { uc_engine *uc; @@ -532,7 +532,7 @@ static void test_i386_invalid_mem_write(void) if (!uc_mem_read(uc, 0xaaaaaaaa, &tmp, sizeof(tmp))) printf(">>> Read 4 bytes from [0x%x] = 0x%x\n", 0xaaaaaaaa, tmp); else - printf(">>> Failed to read 4 bytes from [0x%x]\n", 0xffffffaa); + printf(">>> Failed to read 4 bytes from [0x%x]\n", 0xaaaaaaaa); if (!uc_mem_read(uc, 0xffffffaa, &tmp, sizeof(tmp))) printf(">>> Read 4 bytes from [0x%x] = 0x%x\n", 0xffffffaa, tmp); From 903fb04f298884c057cb8aa21872d9f76dcfbe92 Mon Sep 17 00:00:00 2001 From: Adrian Herrera Date: Tue, 22 Mar 2016 23:09:38 +1100 Subject: [PATCH 2/2] Another typo --- samples/sample_x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/sample_x86.c b/samples/sample_x86.c index bc290de4..7b4fc120 100644 --- a/samples/sample_x86.c +++ b/samples/sample_x86.c @@ -850,7 +850,7 @@ static void test_x86_16(void) uc_mem_map(uc, 0, 8 * 1024, UC_PROT_ALL); // write machine code to be emulated to memory - if (uc_mem_write(uc, 0, X86_CODE16, sizeof(X86_CODE64) - 1)) { + if (uc_mem_write(uc, 0, X86_CODE16, sizeof(X86_CODE16) - 1)) { printf("Failed to write emulation code to memory, quit!\n"); return; }