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
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