diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-10-07 13:44:37 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-10-07 14:38:26 -0700 |
commit | 61a9130e47c4757bccfe2496e1130f814aaec049 (patch) | |
tree | 6cc57561d3975e096bbf56905208db5e3e248917 /gv.c | |
parent | 13058d6734a1146f0910c93c897cabb1fb315975 (diff) | |
download | perl-61a9130e47c4757bccfe2496e1130f814aaec049.tar.gz |
Don’t put malformed UTF8 in $AUTOLOAD
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1204,7 +1204,10 @@ Perl_gv_autoload_pvn(pTHX_ HV *stash, const char *name, STRLEN len, U32 flags) sv_catpvs(varsv, "::"); /* Ensure SvSETMAGIC() is called if necessary. In particular, to clear tainting if $FOO::AUTOLOAD was previously tainted, but is not now. */ - sv_catpvn_mg(varsv, name, len); + sv_catpvn_flags( + varsv, name, len, + SV_GMAGIC|SV_SMAGIC|(is_utf8 ? SV_CATUTF8 : SV_CATBYTES) + ); if (is_utf8) SvUTF8_on(varsv); return gv; |