]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Universal/Variable/Pei/Variable.c
Fix the issue that the variable Unicode string may be not aligned on 16-bit boundary...
[mirror_edk2.git] / EdkModulePkg / Universal / Variable / Pei / Variable.c
index e2f3c4bdddf6d00bd310e90aea7a17bb5a80877d..33772f8513ddb1ff3564deeee9d0ab7866090033 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2007 Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -209,7 +209,7 @@ Returns:
         (((INT32 *) VendorGuid)[2] == ((INT32 *) &Variable->VendorGuid)[2]) &&\r
         (((INT32 *) VendorGuid)[3] == ((INT32 *) &Variable->VendorGuid)[3])\r
         ) {\r
-      if (!StrCmp (VariableName, GET_VARIABLE_NAME_PTR (Variable))) {\r
+      if (!CompareMem (VariableName, GET_VARIABLE_NAME_PTR (Variable), Variable->NameSize)) {\r
         PtrTrack->CurrPtr = Variable;\r
         return EFI_SUCCESS;\r
       }\r