This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Change newSVpv() to newSVpvn() where we know the length is non-zero, as
[perl5.git] / toke.c
diff --git a/toke.c b/toke.c
index eb7c18c..f8d207c 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -5346,7 +5346,7 @@ Perl_yylex(pTHX)
 #ifdef PERL_MAD
                if (PL_madskills && !PL_thistoken) {
                    char *start = SvPVX(PL_linestr) + PL_realtokenstart;
-                   PL_thistoken = newSVpv(start,s - start);
+                   PL_thistoken = newSVpvn(start,s - start);
                    PL_realtokenstart = s - SvPVX(PL_linestr);
                }
 #endif