Skip to content

Commit d5dd7e8

Browse files
authored
Fix possible pointer out-of-bounds issue
1 parent 51bfe3d commit d5dd7e8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

jerry-core/vm/vm.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2955,8 +2955,9 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
29552955
case VM_OC_PROP_PRE_DECR:
29562956
case VM_OC_PROP_POST_INCR:
29572957
case VM_OC_PROP_POST_DECR:
2958-
if (byte_code_start_p[-3] == CBC_EXT_OPCODE
2959-
&& byte_code_start_p[-2] == CBC_EXT_PUSH_PRIVATE_PROP_LITERAL_REFERENCE)
2958+
if (JERRY_UNLIKELY (byte_code_start_p - 3 >= frame_ctx_p->byte_code_p
2959+
&& byte_code_start_p[-3] == CBC_EXT_OPCODE
2960+
&& byte_code_start_p[-2] == CBC_EXT_PUSH_PRIVATE_PROP_LITERAL_REFERENCE))
29602961
{
29612962
if (opcode < CBC_PRE_INCR)
29622963
{

0 commit comments

Comments
 (0)