Replace strcpy with memcpy when we have the length around anyway.

llvm-svn: 94746
diff --git a/llvm/tools/llvm-ld/llvm-ld.cpp b/llvm/tools/llvm-ld/llvm-ld.cpp
index e71aefc..118f6b7 100644
--- a/llvm/tools/llvm-ld/llvm-ld.cpp
+++ b/llvm/tools/llvm-ld/llvm-ld.cpp
@@ -179,8 +179,9 @@
   // Make a copy of the list.  Don't forget the NULL that ends the list.
   entries = 0;
   while (envp[entries] != NULL) {
-    newenv[entries] = new char[strlen (envp[entries]) + 1];
-    strcpy (newenv[entries], envp[entries]);
+    size_t len = strlen(envp[entries]) + 1;
+    newenv[entries] = new char[len];
+    memcpy(newenv[entries], envp[entries], len);
     ++entries;
   }
   newenv[entries] = NULL;