- AsciiFilePath = AllocatePool (StrLen (PathName) + 1);\r
- UnicodeStrToAsciiStr (PathName, AsciiFilePath);\r
+ PathNameLen = StrLen (PathName) + 1;\r
+ AsciiFilePath = AllocatePool (PathNameLen);\r
+ UnicodeStrToAsciiStrS (PathName, AsciiFilePath, PathNameLen);\r