mirror of https://github.com/acidanthera/audk.git
UnitTestFrameworkPkg/PersistenceLib: Correct the allocated size.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2608 According to logic and the practice, it is need to allocate ascii length by 2 for unicode string. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Signed-off-by: Guomin Jiang <guomin.jiang@intel.com> Reviewed-by: Sean Brogan <sean.brogan@microsoft.com>
This commit is contained in:
parent
d5339c04d7
commit
63d425002a
|
@ -67,7 +67,7 @@ GetCacheFileDevicePath (
|
|||
// Before we can start, change test name from ASCII to Unicode.
|
||||
//
|
||||
CacheFilePathLength = AsciiStrLen (Framework->ShortTitle) + 1;
|
||||
TestName = AllocatePool (CacheFilePathLength);
|
||||
TestName = AllocatePool (CacheFilePathLength * sizeof(CHAR16));
|
||||
if (!TestName) {
|
||||
goto Exit;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue