This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Turn 2 strcpy()s into memcpy() because we know the length.
authorNicholas Clark <nick@ccl4.org>
Mon, 19 Jul 2004 08:33:13 +0000 (08:33 +0000)
committerNicholas Clark <nick@ccl4.org>
Mon, 19 Jul 2004 08:33:13 +0000 (08:33 +0000)
p4raw-id: //depot/perl@23135

toke.c

diff --git a/toke.c b/toke.c
index 2b14e02..544a429 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -6632,7 +6632,7 @@ S_scan_heredoc(pTHX_ register char *s)
        sv_setpvn(tmpstr,d+1,s-d);
        s += len - 1;
        sv_catpvn(herewas,s,bufend-s);
-       (void)strcpy(bufptr,SvPVX(herewas));
+       Copy(SvPVX(herewas),bufptr,SvCUR(herewas) + 1,char);
 
        s = olds;
        goto retval;
@@ -6802,7 +6802,7 @@ S_scan_inputsymbol(pTHX_ char *start)
 
        /* turn <> into <ARGV> */
        if (!len)
-           (void)strcpy(d,"ARGV");
+           Copy("ARGV",d,5,char);
 
        /* Check whether readline() is overriden */
        if (((gv_readline = gv_fetchpv("readline", FALSE, SVt_PVCV))