From add98bda82ff3f815dc72c2f50c46f69fa93caf3 Mon Sep 17 00:00:00 2001 From: Jason Hiser <jdhiser@gmail.com> Date: Sat, 16 Feb 2019 15:56:12 -0500 Subject: [PATCH] fixed type-punned pointer alias issue with memcpy --- push64_relocs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/push64_relocs.cpp b/push64_relocs.cpp index 82b78bb13..67031876f 100644 --- a/push64_relocs.cpp +++ b/push64_relocs.cpp @@ -90,7 +90,8 @@ void Push64Relocs_t::HandlePush64Relocation(Instruction_t *insn, Relocation_t *r * we know that the opcode is one byte. * The pushed value will start at the 1th offset. */ - push_addr = *((VirtualOffset_t*)(&push_data_bits[1])); + // push_addr = *((VirtualOffset_t*)(push_data_bits+1)); + memcpy(&push_addr,&push_data_bits[1], 4); if (*m_verbose) cout << "push_addr: 0x" << std::hex << push_addr << endl; -- GitLab