Remove calls to deprecated string functions like AsciiStrCpy() and
UnicodeStrToAsciiStr()
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Step = (Context->DownloadedNbOfBytes * TFTP_PROGRESS_SLIDER_STEPS) / Context->FileSize;\r
if (Step > LastStep) {\r
Print (mTftpProgressDelete);\r
Step = (Context->DownloadedNbOfBytes * TFTP_PROGRESS_SLIDER_STEPS) / Context->FileSize;\r
if (Step > LastStep) {\r
Print (mTftpProgressDelete);\r
- StrCpy (Progress, mTftpProgressFrame);\r
+ CopyMem (Progress, mTftpProgressFrame, sizeof mTftpProgressFrame);\r
for (Index = 1; Index < Step; Index++) {\r
Progress[Index] = L'=';\r
}\r
for (Index = 1; Index < Step; Index++) {\r
Progress[Index] = L'=';\r
}\r
UINT64 FileSize;\r
UINT64 TftpBufferSize;\r
BDS_TFTP_CONTEXT *TftpContext;\r
UINT64 FileSize;\r
UINT64 TftpBufferSize;\r
BDS_TFTP_CONTEXT *TftpContext;\r
\r
ASSERT(IS_DEVICE_PATH_NODE (RemainingDevicePath, MESSAGING_DEVICE_PATH, MSG_IPv4_DP));\r
IPv4DevicePathNode = (IPv4_DEVICE_PATH*)RemainingDevicePath;\r
\r
ASSERT(IS_DEVICE_PATH_NODE (RemainingDevicePath, MESSAGING_DEVICE_PATH, MSG_IPv4_DP));\r
IPv4DevicePathNode = (IPv4_DEVICE_PATH*)RemainingDevicePath;\r
\r
// The Device Path might contain multiple FilePath nodes\r
PathName = ConvertDevicePathToText ((EFI_DEVICE_PATH_PROTOCOL*)(IPv4DevicePathNode + 1), FALSE, FALSE);\r
\r
// The Device Path might contain multiple FilePath nodes\r
PathName = ConvertDevicePathToText ((EFI_DEVICE_PATH_PROTOCOL*)(IPv4DevicePathNode + 1), FALSE, FALSE);\r
- AsciiFilePath = AllocatePool (StrLen (PathName) + 1);\r
- UnicodeStrToAsciiStr (PathName, AsciiFilePath);\r
+ PathNameLen = StrLen (PathName) + 1;\r
+ AsciiFilePath = AllocatePool (PathNameLen);\r
+ UnicodeStrToAsciiStrS (PathName, AsciiFilePath, PathNameLen);\r
\r
//\r
// Try to get the size of the file in bytes from the server. If it fails,\r
\r
//\r
// Try to get the size of the file in bytes from the server. If it fails,\r