Fix the issue that the variable Unicode string may be not aligned on 16-bit boundary in flash (it dependent on ALIGNMENT macro in EdkModulePkg\Universal\Variable\Pei\x64\VarMachine.h). The unalignment Unicode string will lead assert of StrCmp, StrCopy, StrLen function in Mde library.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2482 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007 Intel Corporation. <BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -209,7 +209,7 @@ Returns:
|
||||
(((INT32 *) VendorGuid)[2] == ((INT32 *) &Variable->VendorGuid)[2]) &&
|
||||
(((INT32 *) VendorGuid)[3] == ((INT32 *) &Variable->VendorGuid)[3])
|
||||
) {
|
||||
if (!StrCmp (VariableName, GET_VARIABLE_NAME_PTR (Variable))) {
|
||||
if (!CompareMem (VariableName, GET_VARIABLE_NAME_PTR (Variable), Variable->NameSize)) {
|
||||
PtrTrack->CurrPtr = Variable;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user