return NULL;\r
}\r
\r
- UnicodeStrToAsciiStr(Unicode, Ascii);\r
+ UnicodeStrToAsciiStrS (Unicode, Ascii, MAX_PASSWORD_SIZE + 1);\r
\r
return Ascii;\r
}\r
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
\r
OpalHiiGetBrowserData();\r
\r
- UnicodeStrToAsciiStr(gHiiConfiguration.Psid, (CHAR8*)Psid.Psid);\r
+ UnicodeStrToAsciiStrS (gHiiConfiguration.Psid, (CHAR8*)Psid.Psid, PSID_CHARACTER_LENGTH);\r
\r
OpalDisk = HiiGetOpalDiskCB (gHiiConfiguration.SelectedDiskIndex);\r
if (OpalDisk != NULL) {\r
return EFI_BUFFER_TOO_SMALL;\r
}\r
\r
- UnicodeStrToAsciiStr(UniStr, Password);\r
+ UnicodeStrToAsciiStrS (UniStr, Password, sizeof (Password));\r
gBS->FreePool(UniStr);\r
\r
if (gHiiConfiguration.SelectedAction == HII_KEY_ID_GOTO_UNLOCK) {\r
//\r
// Copy into unicode string, then copy into string id\r
//\r
- AsciiStrToUnicodeStr( SrcAsciiStr, UniStr );\r
+ AsciiStrToUnicodeStrS ( SrcAsciiStr, UniStr, Len + 1);\r
\r
//\r
// Update the string in the form\r