X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=EdkNt32Pkg%2FDxe%2FPlatformBds%2FGeneric%2FBootMaint%2FBootOption.c;h=57b5239530c76876ff8ff8d08aafb88ee93e3ebc;hp=13e82759e12d5bee532b22b0cd73b709d42f45cc;hb=4224ac208726ee643afc2d3712b6bf4b86184fb4;hpb=2ce311322c72857f73138c45358e722607a1e80c diff --git a/EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/BootOption.c b/EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/BootOption.c index 13e82759e1..57b5239530 100644 --- a/EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/BootOption.c +++ b/EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/BootOption.c @@ -1055,6 +1055,27 @@ Returns: return MenuCount; } +CHAR16 * +BdsStrCpy ( + OUT CHAR16 *Destination, + IN CONST CHAR16 *Source + ) +{ + CHAR16 *ReturnValue; + + // + // Destination cannot be NULL + // + ASSERT (Destination != NULL); + + ReturnValue = Destination; + while (*Source) { + *(Destination++) = *(Source++); + } + *Destination = 0; + return ReturnValue; +} + CHAR16 * BOpt_AppendFileName ( IN CHAR16 *Str1, @@ -1102,13 +1123,13 @@ Returns: // DO NOT convert the .. if it is at the end of the string. This will // break the .. behavior in changing directories. // - StrCpy (LastSlash, Ptr + 3); + BdsStrCpy (LastSlash, Ptr + 3); Ptr = LastSlash; } else if (*Ptr == '\\' && *(Ptr + 1) == '.' && *(Ptr + 2) == '\\') { // // Convert a \.\ to a \ // - StrCpy (Ptr, Ptr + 2); + BdsStrCpy (Ptr, Ptr + 2); Ptr = LastSlash; } else if (*Ptr == '\\') { LastSlash = Ptr;