BOUND regex opcodes (\b, \B) could try to scan zero length UTF-8.
[p5sagit/p5-mst-13.2.git] / sv.c
diff --git a/sv.c b/sv.c
index 5e18582..be1947a 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -2860,7 +2860,8 @@ Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr)
        if (SvTEMP(sstr) &&             /* slated for free anyway? */
            SvREFCNT(sstr) == 1 &&      /* and no other references to it? */
            !(sflags & SVf_OOK) &&      /* and not involved in OOK hack? */
-           SvLEN(sstr))                        /* and really is a string */
+           SvLEN(sstr)         &&      /* and really is a string */
+           !(PL_op && PL_op->op_type == OP_AASSIGN)) /* and won't be needed again, potentially */
        {
            if (SvPVX(dstr)) {          /* we know that dtype >= SVt_PV */
                if (SvOOK(dstr)) {
@@ -6623,6 +6624,10 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
            *--eptr = '%';
 
            (void)sprintf(PL_efloatbuf, eptr, nv);
+#ifdef USE_LOCALE_NUMERIC
+           if ((PL_hints & HINT_LOCALE) && maybe_tainted)
+               *maybe_tainted = TRUE;
+#endif
 
            eptr = PL_efloatbuf;
            elen = strlen(PL_efloatbuf);