]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c
SecurityPkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr
[mirror_edk2.git] / SecurityPkg / Tcg / Opal / OpalPasswordDxe / OpalDriver.c
index 3764b243444c6d8efbe46eb68d26dbe10734ba22..9bf1ced3cc7ec08a4d602fb4c0f05a91347331f8 100644 (file)
@@ -239,7 +239,7 @@ OpalDriverPopUpHddPassword (
     return NULL;\r
   }\r
 \r
-  UnicodeStrToAsciiStr(Unicode, Ascii);\r
+  UnicodeStrToAsciiStrS (Unicode, Ascii, MAX_PASSWORD_SIZE + 1);\r
 \r
   return Ascii;\r
 }\r
@@ -616,7 +616,7 @@ OpalDriverGetDeviceNameByProtocol(
         ASSERT (Dev->Name16 != NULL);\r
         StrCpyS (Dev->Name16, StrLength, DevName);\r
         Dev->NameZ = (CHAR8*)AllocateZeroPool(StrLength);\r
-        UnicodeStrToAsciiStr(DevName, Dev->NameZ);\r
+        UnicodeStrToAsciiStrS (DevName, Dev->NameZ, StrLength);\r
 \r
         //\r
         // Retrieve bridge BDF info and port number or namespace depending on type\r