summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2015-09-16 15:58:27 -0600
committerKarl Williamson <khw@cpan.org>2015-09-16 16:04:20 -0600
commitd820a0ff34c7df39297a54193fd756bb42c5c06e (patch)
tree0f2920301f06b8bec53674c5a0f91d8109b90aa5
parent387eee9be1b46a1eb35db63974b74a2982094ccf (diff)
downloadperl-d820a0ff34c7df39297a54193fd756bb42c5c06e.tar.gz
regexec.c: Use Perl_croak_nocontext()
Instead of doing a dTHX introduced in 22b433eff9a1ffa2454e18405a56650f07b385b5. I should have pointed out in that commit message, that instead of doing a full-fledged UTF-8 well-formedness check, it does a quick sanity check sufficient to prevent looping Spotted by Vincent Pitt
-rw-r--r--regexec.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/regexec.c b/regexec.c
index 1aa0c47ca3..e92e7a3901 100644
--- a/regexec.c
+++ b/regexec.c
@@ -8762,8 +8762,7 @@ S_reghop3(U8 *s, SSize_t off, const U8* lim)
while (s > lim && UTF8_IS_CONTINUATION(*s))
s--;
if (! UTF8_IS_START(*s)) {
- dTHX;
- Perl_croak(aTHX_ "Malformed UTF-8 character (fatal)");
+ Perl_croak_nocontext("Malformed UTF-8 character (fatal)");
}
}
/* XXX could check well-formedness here */
@@ -8790,8 +8789,7 @@ S_reghop4(U8 *s, SSize_t off, const U8* llim, const U8* rlim)
while (s > llim && UTF8_IS_CONTINUATION(*s))
s--;
if (! UTF8_IS_START(*s)) {
- dTHX;
- Perl_croak(aTHX_ "Malformed UTF-8 character (fatal)");
+ Perl_croak_nocontext("Malformed UTF-8 character (fatal)");
}
}
/* XXX could check well-formedness here */
@@ -8823,8 +8821,7 @@ S_reghopmaybe3(U8* s, SSize_t off, const U8* lim)
while (s > lim && UTF8_IS_CONTINUATION(*s))
s--;
if (! UTF8_IS_START(*s)) {
- dTHX;
- Perl_croak(aTHX_ "Malformed UTF-8 character (fatal)");
+ Perl_croak_nocontext("Malformed UTF-8 character (fatal)");
}
}
/* XXX could check well-formedness here */