diff options
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1878,7 +1878,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, if (scv) goto fail; STACK_PUSH_ALT_WITH_STATE_CHECK(p, s, sprev, mem); - n = enclen(encode, s); + n = enclen(encode, s, end); DATA_ENSURE(n); if (ONIGENC_IS_MBC_NEWLINE(encode, s, end)) goto fail; sprev = s; @@ -1896,7 +1896,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, if (scv) goto fail; STACK_PUSH_ALT_WITH_STATE_CHECK(p, s, sprev, mem); - n = enclen(encode, s); + n = enclen(encode, s, end); if (n > 1) { DATA_ENSURE(n); sprev = s; |