git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9588
6f19259b-4bc3-4df7-8a09-
765794883524
IN UINTN Length\r
)\r
{\r
IN UINTN Length\r
)\r
{\r
- StrnCpy (Destination + StrLen (Destination), Source, Length);\r
+ UINTN DestinationLen;\r
+\r
+ DestinationLen = StrLen (Destination);\r
+ StrnCpy (Destination + DestinationLen, Source, Length);\r
+ Destination[DestinationLen + Length] = L'\0';\r
\r
//\r
// Size of the resulting string should never be zero.\r
\r
//\r
// Size of the resulting string should never be zero.\r
IN UINTN Length\r
)\r
{\r
IN UINTN Length\r
)\r
{\r
- AsciiStrnCpy (Destination + AsciiStrLen (Destination), Source, Length);\r
+ UINTN DestinationLen;\r
+\r
+ DestinationLen = AsciiStrLen (Destination);\r
+ AsciiStrnCpy (Destination + DestinationLen, Source, Length);\r
+ Destination[DestinationLen + Length] = '\0';\r
\r
//\r
// Size of the resulting string should never be zero.\r
\r
//\r
// Size of the resulting string should never be zero.\r