summaryrefslogtreecommitdiff
path: root/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c
diff options
context:
space:
mode:
Diffstat (limited to 'SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c')
-rw-r--r--SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c b/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c
index 3764b24344..9bf1ced3cc 100644
--- a/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c
+++ b/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c
@@ -239,7 +239,7 @@ OpalDriverPopUpHddPassword (
return NULL;
}
- UnicodeStrToAsciiStr(Unicode, Ascii);
+ UnicodeStrToAsciiStrS (Unicode, Ascii, MAX_PASSWORD_SIZE + 1);
return Ascii;
}
@@ -616,7 +616,7 @@ OpalDriverGetDeviceNameByProtocol(
ASSERT (Dev->Name16 != NULL);
StrCpyS (Dev->Name16, StrLength, DevName);
Dev->NameZ = (CHAR8*)AllocateZeroPool(StrLength);
- UnicodeStrToAsciiStr(DevName, Dev->NameZ);
+ UnicodeStrToAsciiStrS (DevName, Dev->NameZ, StrLength);
//
// Retrieve bridge BDF info and port number or namespace depending on type