develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34232 - trunk/src

From:
petdance
Date:
December 21, 2008 21:52
Subject:
[svn:parrot] r34232 - trunk/src
Message ID:
20081222055216.96499CBA12@x12.develooper.com
Author: petdance
Date: Sun Dec 21 21:52:15 2008
New Revision: 34232

Modified:
   trunk/src/inter_run.c

Log:
change strcpy to memcpy

Modified: trunk/src/inter_run.c
==============================================================================
--- trunk/src/inter_run.c	(original)
+++ trunk/src/inter_run.c	Sun Dec 21 21:52:15 2008
@@ -216,7 +216,8 @@
                 "too many arguments in runops_args");
 
         new_sig[0] = 'O';
-        strcpy(new_sig + 1, sig + 1);
+        /* -1 from the end, +1 for the nul at the end */
+        memcpy(new_sig+1, sig+1, len-1+1);
         sig_p = new_sig;
     }
 



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About