This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix deeply nested closures that have no references to lexical in
[perl5.git] / sv.c
diff --git a/sv.c b/sv.c
index 918769b..010ce2e 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -3210,6 +3210,7 @@ Perl_sv_insert(pTHX_ SV *bigstr, STRLEN offset, STRLEN len, char *little, STRLEN
        SvCUR_set(bigstr, offset+len);
     }
 
+    SvTAINT(bigstr);
     i = littlelen - len;
     if (i > 0) {                       /* string might grow */
        big = SvGROW(bigstr, SvCUR(bigstr) + i + 1);
@@ -4058,10 +4059,6 @@ screamer2:
        }
     }
 
-#ifdef WIN32
-    win32_strip_return(sv);
-#endif
-
     return (SvCUR(sv) - append) ? SvPVX(sv) : Nullch;
 }
 
@@ -4585,8 +4582,7 @@ Perl_sv_true(pTHX_ register SV *sv)
     if (SvPOK(sv)) {
        register XPV* tXpv;
        if ((tXpv = (XPV*)SvANY(sv)) &&
-               (*tXpv->xpv_pv > '0' ||
-               tXpv->xpv_cur > 1 ||
+               (tXpv->xpv_cur > 1 ||
                (tXpv->xpv_cur && *tXpv->xpv_pv != '0')))
            return 1;
        else
@@ -7306,7 +7302,7 @@ do_clean_objs(pTHXo_ SV *sv)
 static void
 do_clean_named_objs(pTHXo_ SV *sv)
 {
-    if (SvTYPE(sv) == SVt_PVGV) {
+    if (SvTYPE(sv) == SVt_PVGV && GvGP(sv)) {
        if ( SvOBJECT(GvSV(sv)) ||
             GvAV(sv) && SvOBJECT(GvAV(sv)) ||
             GvHV(sv) && SvOBJECT(GvHV(sv)) ||