EmbeddedPkg/Ebl: eliminate deprecated string function calls

Get rid of calls to unsafe string functions. These are deprecated and may
be removed in the future.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
This commit is contained in:
Ard Biesheuvel
2016-10-24 18:30:37 +01:00
parent 310908760f
commit 5140a6dfb9
5 changed files with 25 additions and 18 deletions

View File

@@ -116,7 +116,8 @@ EblDirCmd (
UnicodeFileName[0] = '\0';
MatchSubString = &UnicodeFileName[0];
if (Argc > 2) {
AsciiStrToUnicodeStr (Argv[2], UnicodeFileName);
AsciiStrToUnicodeStrS (Argv[2], UnicodeFileName,
ARRAY_SIZE (UnicodeFileName));
if (UnicodeFileName[0] == '*') {
// Handle *Name substring matching
MatchSubString = &UnicodeFileName[1];
@@ -231,7 +232,7 @@ EblDirCmd (
MatchSubString = NULL;
UnicodeFileName[0] = '\0';
if (Argc > 2) {
AsciiStrToUnicodeStr (Argv[2], UnicodeFileName);
AsciiStrToUnicodeStrS (Argv[2], UnicodeFileName, MAX_CMD_LINE);
if (UnicodeFileName[0] == '*') {
MatchSubString = &UnicodeFileName[1];
}