msvcrt: Fix read beyond end of string in __unDNameEx().
diff --git a/dlls/msvcrt/undname.c b/dlls/msvcrt/undname.c
index 1cda196..ebf51fa 100644
--- a/dlls/msvcrt/undname.c
+++ b/dlls/msvcrt/undname.c
@@ -1233,8 +1233,7 @@
     result = symbol_demangle(&sym) ? sym.result : mangled;
     if (buffer && buflen)
     {
-        memcpy(buffer, result, buflen - 1);
-        buffer[buflen - 1] = '\0';
+        lstrcpynA( buffer, result, buflen);
     }
     else
     {