diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-10-24 16:31:06 +0100 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-10-28 12:04:07 +0100 |
commit | 581b4ab93ff4853221063250fa22812a4121258e (patch) | |
tree | 5d08f1d8451b4a479804115cdc5a4f1ae4e272da /ArmPkg/Library | |
parent | f6c4d99ae4e849fdd9628240a9b5ee70ed833fae (diff) | |
download | edk2-platforms-581b4ab93ff4853221063250fa22812a4121258e.tar.xz |
ArmPkg/BdsLib: eliminate calls to deprecated string functions
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>
Diffstat (limited to 'ArmPkg/Library')
-rw-r--r-- | ArmPkg/Library/BdsLib/BdsFilePath.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ArmPkg/Library/BdsLib/BdsFilePath.c b/ArmPkg/Library/BdsLib/BdsFilePath.c index aefeaed4ff..f9d8c4c205 100644 --- a/ArmPkg/Library/BdsLib/BdsFilePath.c +++ b/ArmPkg/Library/BdsLib/BdsFilePath.c @@ -964,7 +964,7 @@ Mtftp4CheckPacket ( Step = (Context->DownloadedNbOfBytes * TFTP_PROGRESS_SLIDER_STEPS) / Context->FileSize;
if (Step > LastStep) {
Print (mTftpProgressDelete);
- StrCpy (Progress, mTftpProgressFrame);
+ CopyMem (Progress, mTftpProgressFrame, sizeof mTftpProgressFrame);
for (Index = 1; Index < Step; Index++) {
Progress[Index] = L'=';
}
@@ -1044,6 +1044,7 @@ BdsTftpLoadImage ( UINT64 FileSize;
UINT64 TftpBufferSize;
BDS_TFTP_CONTEXT *TftpContext;
+ UINTN PathNameLen;
ASSERT(IS_DEVICE_PATH_NODE (RemainingDevicePath, MESSAGING_DEVICE_PATH, MSG_IPv4_DP));
IPv4DevicePathNode = (IPv4_DEVICE_PATH*)RemainingDevicePath;
@@ -1187,8 +1188,9 @@ BdsTftpLoadImage ( // The Device Path might contain multiple FilePath nodes
PathName = ConvertDevicePathToText ((EFI_DEVICE_PATH_PROTOCOL*)(IPv4DevicePathNode + 1), FALSE, FALSE);
- AsciiFilePath = AllocatePool (StrLen (PathName) + 1);
- UnicodeStrToAsciiStr (PathName, AsciiFilePath);
+ PathNameLen = StrLen (PathName) + 1;
+ AsciiFilePath = AllocatePool (PathNameLen);
+ UnicodeStrToAsciiStrS (PathName, AsciiFilePath, PathNameLen);
//
// Try to get the size of the file in bytes from the server. If it fails,
|