This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
use lengths in sv_setpv() calls
[perl5.git] / gv.c
diff --git a/gv.c b/gv.c
index f1fe784..2d0fc93 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -1094,11 +1094,11 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
            break;
 
        case '\014':    /* $^L */
            break;
 
        case '\014':    /* $^L */
-           sv_setpv(GvSV(gv),"\f");
+           sv_setpvn(GvSV(gv),"\f",1);
            PL_formfeed = GvSV(gv);
            break;
        case ';':
            PL_formfeed = GvSV(gv);
            break;
        case ';':
-           sv_setpv(GvSV(gv),"\034");
+           sv_setpvn(GvSV(gv),"\034",1);
            break;
        case ']':
        {
            break;
        case ']':
        {