From 9ee351f37fbf78aa408f60c0d2c7ec49e625f109 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Wed, 5 Feb 2020 10:33:28 -0800 Subject: 5983 - fix an emulator bounds-check bug It was possible for an instruction to write out of bounds of the memory data structure. Most of the time this worked fine. However if the block ever got resized and moved the out-of-bounds bytes no longer went along. --- 015immediate_addressing.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '015immediate_addressing.cc') diff --git a/015immediate_addressing.cc b/015immediate_addressing.cc index c264d5d3..a2923b7a 100644 --- a/015immediate_addressing.cc +++ b/015immediate_addressing.cc @@ -1235,7 +1235,7 @@ case 0xc7: { // copy imm32 to r32 int32_t* dest = effective_address(modrm); const int32_t src = next32(); trace(Callstack_depth+1, "run") << "imm32 is 0x" << HEXWORD << src << end(); - *dest = src; + *dest = src; // Write multiple elements of vector at once. Assumes sizeof(int) == 4 on the host as well. break; } -- cgit 1.4.1-2-gfad0