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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94746 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/PIC16/PIC16.h b/lib/Target/PIC16/PIC16.h
index e46c9b2..8d067de 100644
--- a/lib/Target/PIC16/PIC16.h
+++ b/lib/Target/PIC16/PIC16.h
@@ -55,9 +55,10 @@
 
   // External symbol names require memory to live till the program end.
   // So we have to allocate it and keep.
+  // FIXME: Don't leak the allocated strings.
   inline static const char *createESName (const std::string &name) {
     char *tmpName = new char[name.size() + 1];
-    strcpy (tmpName, name.c_str());
+    memcpy(tmpName, name.c_str(), name.size() + 1);
     return tmpName;
   }