Skip to content
Snippets Groups Projects
Commit add98bda authored by Jason Hiser's avatar Jason Hiser :tractor:
Browse files

fixed type-punned pointer alias issue with memcpy

parent d918e4ae
No related branches found
No related tags found
No related merge requests found
...@@ -90,7 +90,8 @@ void Push64Relocs_t::HandlePush64Relocation(Instruction_t *insn, Relocation_t *r ...@@ -90,7 +90,8 @@ void Push64Relocs_t::HandlePush64Relocation(Instruction_t *insn, Relocation_t *r
* we know that the opcode is one byte. * we know that the opcode is one byte.
* The pushed value will start at the 1th offset. * 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) if (*m_verbose)
cout << "push_addr: 0x" << std::hex << push_addr << endl; cout << "push_addr: 0x" << std::hex << push_addr << endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment