From b4ee064b539958f6a13bc9554758a106a49f4bd6 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Wed, 22 May 2019 17:51:42 +0200 Subject: Yield when validating UTF8 for long subject in re:run() --- erts/emulator/beam/erl_bif_re.c | 1 + 1 file changed, 1 insertion(+) (limited to 'erts/emulator/beam') diff --git a/erts/emulator/beam/erl_bif_re.c b/erts/emulator/beam/erl_bif_re.c index ad124fd979..4067d42216 100644 --- a/erts/emulator/beam/erl_bif_re.c +++ b/erts/emulator/beam/erl_bif_re.c @@ -1434,6 +1434,7 @@ static BIF_RETTYPE re_exec_trap(BIF_ALIST_3) loop_count = 0xFFFFFFFF; #endif rc = erts_pcre_exec(NULL, &(restartp->extra), NULL, 0, 0, 0, NULL, 0); + ASSERT(loop_count != 0xFFFFFFFF); BUMP_REDS(BIF_P, loop_count / LOOP_FACTOR); if (rc == PCRE_ERROR_LOOP_LIMIT) { -- cgit v1.2.3