bytecode_vm: restore stack_id after function return

This allows pointers to local stack variables to work correctly after a call.
Previously stackid was not restored, which caused bytecode_vm to stop bytecodes,
claiming it overrun the stack, when in fact it didn't.
(stackid stores stack size).
0.96
Török Edvin 15 years ago
parent 6b5af78c33
commit 2cad69f723
  1. 1
      libclamav/bytecode_vm.c

@ -468,6 +468,7 @@ static always_inline struct stack_entry *pop_stack(struct stack *stack,
stop = CL_BREAK;\
continue;\
}\
stackid = ptr_register_stack(&ptrinfos, values, 0, func->numBytes)>>32;\
inst = &bb->insts[bb_inst];\
break;\
}

Loading…
Cancel
Save