diff options
author | Tony Cook <tony@develop-help.com> | 2015-02-26 11:21:16 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2015-02-26 11:21:16 +1100 |
commit | ed38223246c041b4e9ce5687cadf6f6b903050ca (patch) | |
tree | ba8699c69934cb733ca509740eb98775652334c2 /mg.h | |
parent | e11fa374c86b187ae1e8382680d49e2e44abf1bb (diff) | |
download | perl-ed38223246c041b4e9ce5687cadf6f6b903050ca.tar.gz |
[perl #123202] speed up scalar //g against tainted strings
Diffstat (limited to 'mg.h')
-rw-r--r-- | mg.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -65,7 +65,7 @@ struct magic { /* assumes get-magic and stringification have already occurred */ # define MgBYTEPOS_set(mg,sv,pv,off) ( \ assert_((mg)->mg_type == PERL_MAGIC_regex_global) \ - SvPOK(sv) && !SvGMAGICAL(sv) \ + SvPOK(sv) && (!SvGMAGICAL(sv) || sv_only_taint_gmagic(sv)) \ ? (mg)->mg_len = (off), (mg)->mg_flags |= MGf_BYTES \ : ((mg)->mg_len = DO_UTF8(sv) \ ? (SSize_t)utf8_length((U8 *)(pv), (U8 *)(pv)+(off)) \ |