|
|
|
@ -939,9 +939,16 @@ class Instruction: |
|
|
|
|
|
|
|
|
|
return [global_state] |
|
|
|
|
|
|
|
|
|
try: |
|
|
|
|
memory_out_offset = util.get_concrete_int(memory_out_offset) if isinstance(memory_out_offset, ExprRef) else memory_out_offset |
|
|
|
|
memory_out_size = util.get_concrete_int(memory_out_size) if isinstance(memory_out_size, ExprRef) else memory_out_size |
|
|
|
|
except AttributeError: |
|
|
|
|
global_state.mstate.stack.append(BitVec("retval_" + str(instr['address']), 256)) |
|
|
|
|
return [global_state] |
|
|
|
|
|
|
|
|
|
# Copy memory |
|
|
|
|
global_state.mstate.mem_extend(memory_out_offset, min(memory_out_size.as_long(), len(global_state.last_return_data))) |
|
|
|
|
for i in range(min(memory_out_size.as_long(), len(global_state.last_return_data))): |
|
|
|
|
global_state.mstate.mem_extend(memory_out_offset, min(memory_out_size, len(global_state.last_return_data))) |
|
|
|
|
for i in range(min(memory_out_size, len(global_state.last_return_data))): |
|
|
|
|
global_state.mstate.memory[i + memory_out_offset] = global_state.last_return_data[i] |
|
|
|
|
|
|
|
|
|
# Put return value on stack |
|
|
|
|