From 6d1bf13948635bfbaeb1dbe75fd059ae4d1f6a1d Mon Sep 17 00:00:00 2001 From: Ruben Ayrapetyan Date: Wed, 13 Jan 2016 13:45:17 +0300 Subject: [PATCH] Fix incorrect assertion in bc_load_bytecode_data. Related issue: #797 JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com --- jerry-core/parser/js/bc/bytecode-data.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jerry-core/parser/js/bc/bytecode-data.cpp b/jerry-core/parser/js/bc/bytecode-data.cpp index 594b99894..ac31e1c48 100644 --- a/jerry-core/parser/js/bc/bytecode-data.cpp +++ b/jerry-core/parser/js/bc/bytecode-data.cpp @@ -763,7 +763,7 @@ bc_load_bytecode_data (const uint8_t *snapshot_data_p, /**< buffer with instruct scopes_num++; snapshot_offset += out_bytecode_data_size; - JERRY_ASSERT (snapshot_offset < snapshot_size); + JERRY_ASSERT (snapshot_offset <= snapshot_size); bytecode_data_header_t* next_to_handle_list_p = bc_header_p; @@ -795,7 +795,7 @@ bc_load_bytecode_data (const uint8_t *snapshot_data_p, /**< buffer with instruct } } - JERRY_ASSERT (snapshot_size > snapshot_offset); + JERRY_ASSERT (snapshot_offset < snapshot_size); bytecode_data_header_t *next_header_p = bc_load_bytecode_with_idx_map (snapshot_data_p + snapshot_offset, snapshot_size - snapshot_offset, lit_map_p,