diff options
author | Karl Williamson <khw@cpan.org> | 2015-09-16 15:58:27 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2015-09-16 16:04:20 -0600 |
commit | d820a0ff34c7df39297a54193fd756bb42c5c06e (patch) | |
tree | 0f2920301f06b8bec53674c5a0f91d8109b90aa5 | |
parent | 387eee9be1b46a1eb35db63974b74a2982094ccf (diff) | |
download | perl-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.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -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 */ |