Fix index handling in ecma_op_advance_string_index (#3406)
Fixes #3389 JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
This commit is contained in:
committed by
Dániel Bátyai
parent
bfc495f0cb
commit
4443c88bf4
@@ -2816,7 +2816,10 @@ ecma_op_advance_string_index (ecma_string_t *str_p, /**< input string */
|
|||||||
bool is_unicode) /**< true - if regexp object's "unicode" flag is set
|
bool is_unicode) /**< true - if regexp object's "unicode" flag is set
|
||||||
false - otherwise */
|
false - otherwise */
|
||||||
{
|
{
|
||||||
JERRY_ASSERT (index < UINT32_MAX - 1);
|
if (index >= UINT32_MAX - 1)
|
||||||
|
{
|
||||||
|
return UINT32_MAX;
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t next_index = index + 1;
|
uint32_t next_index = index + 1;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user