diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-02-18 19:01:48 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-02-18 19:01:48 +0000 |
commit | dc0c6abb4831ca4f92936b3f2d60d8c6cf65c6f1 (patch) | |
tree | 25ac2b09bd9f83f4aaad48ed385fe1da37c128d7 /utf8.c | |
parent | d020f5c489f4f9dfad0aa88c9bea73bdb19071d1 (diff) | |
download | perl-dc0c6abb4831ca4f92936b3f2d60d8c6cf65c6f1.tar.gz |
save_re_context() and even errsv_save = newSVsv(ERRSV); can turn
PL_tainted back on, so defer turning if off as late as possible.
This gets lib/locale.t working once more.
p4raw-id: //depot/perl@27222
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -1592,14 +1592,17 @@ Perl_swash_init(pTHX_ const char* pkg, const char* name, SV *listsv, I32 minbits ENTER; SAVEI32(PL_hints); PL_hints = 0; - /* It is assumed that callers of this routine are not passing in any - user derived data. */ - SAVEBOOL(PL_tainted); - PL_tainted = 0; save_re_context(); if (!gv_fetchmeth(stash, "SWASHNEW", 8, -1)) { /* demand load utf8 */ ENTER; errsv_save = newSVsv(ERRSV); + /* It is assumed that callers of this routine are not passing in any + user derived data. */ + /* Need to do this after save_re_context() as it will set PL_tainted to + 1 while saving $1 etc (see the code after getrx: in Perl_magic_get). + Even line to create errsv_save can turn on PL_tainted. */ + SAVEBOOL(PL_tainted); + PL_tainted = 0; Perl_load_module(aTHX_ PERL_LOADMOD_NOIMPORT, newSVpvn(pkg,pkg_len), NULL); if (!SvTRUE(ERRSV)) |