]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
Update the copyright notice format
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Expression.c
index 90fdc7462ffa17dfab6f7c41ce3615c5c1b0d02c..a50ef5ca7361f03d04164e08c7181aeed2d93efc 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
 Utility functions for expression evaluation.\r
 \r
-Copyright (c) 2007 - 2010, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+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
 http://opensource.org/licenses/bsd-license.php\r
@@ -1528,7 +1528,7 @@ CheckUserPrivilege (
     RemainSize = UserInfo->InfoSize - sizeof (EFI_USER_INFO);\r
     AccessControl = (EFI_USER_INFO_ACCESS_CONTROL *)(UserInfo + 1);\r
     while (RemainSize >= sizeof (EFI_USER_INFO_ACCESS_CONTROL)) {\r
-      if (RemainSize < AccessControl->Size || AccessControl->Size <= sizeof (EFI_USER_INFO_ACCESS_CONTROL)) {\r
+      if (RemainSize < AccessControl->Size || AccessControl->Size < sizeof (EFI_USER_INFO_ACCESS_CONTROL)) {\r
         break;\r
       }\r
       if (AccessControl->Type == EFI_USER_INFO_ACCESS_SETUP) {\r
@@ -1729,6 +1729,7 @@ EvaluateExpression (
             //\r
             Status = GetValueByName (OpCode->VarStorage, OpCode->ValueName, &StrPtr);\r
             if (!EFI_ERROR (Status)) {\r
+              ASSERT (StrPtr != NULL);\r
               TempLength = StrLen (StrPtr);\r
               if (OpCode->ValueWidth >= ((TempLength + 1) / 2)) {\r
                 Value->Type = OpCode->ValueType;\r
@@ -1740,7 +1741,7 @@ EvaluateExpression (
                   if ((Index & 1) == 0) {\r
                     TempBuffer [Index/2] = DigitUint8;\r
                   } else {\r
-                    TempBuffer [Index/2] = (UINT8) ((DigitUint8 << 4) + TempStr [Index/2]);\r
+                    TempBuffer [Index/2] = (UINT8) ((DigitUint8 << 4) + TempBuffer [Index/2]);\r
                   }\r
                 }\r
               }                \r