summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-13 06:07:36 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-13 06:07:36 +0000
commit89c18a1e9e6c6c5da7a377eff3578781a3ebcb0e (patch)
tree80b39685fd55e6fd2329cb4294225a77b7f80e98
parent1fef733cc7f33adaabdb7becc9c03fab2f41b8a3 (diff)
downloadedk2-platforms-89c18a1e9e6c6c5da7a377eff3578781a3ebcb0e.tar.xz
enhanced security check.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7520 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Universal/PCD/Dxe/Service.c12
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c4
2 files changed, 8 insertions, 8 deletions
diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.c b/MdeModulePkg/Universal/PCD/Dxe/Service.c
index f07c107412..977db39d42 100644
--- a/MdeModulePkg/Universal/PCD/Dxe/Service.c
+++ b/MdeModulePkg/Universal/PCD/Dxe/Service.c
@@ -106,8 +106,8 @@ GetWorker (
}
PcdDb = IsPeiDb ? ((UINT8 *) &mPcdDatabase->PeiDb) : ((UINT8 *) &mPcdDatabase->DxeDb);
- StringTable = IsPeiDb ? mPcdDatabase->PeiDb.Init.StringTable :
- mPcdDatabase->DxeDb.Init.StringTable;
+ StringTable = (UINT16 *) (IsPeiDb ? &mPcdDatabase->PeiDb.Init.StringTable[0] :
+ &mPcdDatabase->DxeDb.Init.StringTable[0]);
Offset = LocalTokenNumber & PCD_DATABASE_OFFSET_MASK;
@@ -118,8 +118,8 @@ GetWorker (
break;
case PCD_TYPE_HII:
- GuidTable = IsPeiDb ? mPcdDatabase->PeiDb.Init.GuidTable :
- mPcdDatabase->DxeDb.Init.GuidTable;
+ GuidTable = (EFI_GUID *) (IsPeiDb ? &mPcdDatabase->PeiDb.Init.GuidTable[0] :
+ &mPcdDatabase->DxeDb.Init.GuidTable[0]);
VariableHead = (VARIABLE_HEAD *) (PcdDb + Offset);
@@ -761,8 +761,8 @@ SetWorker (
PcdDb = IsPeiDb ? ((UINT8 *) &mPcdDatabase->PeiDb) : ((UINT8 *) &mPcdDatabase->DxeDb);
- StringTable = IsPeiDb ? mPcdDatabase->PeiDb.Init.StringTable :
- mPcdDatabase->DxeDb.Init.StringTable;
+ StringTable = (UINT16 *) (IsPeiDb ? &mPcdDatabase->PeiDb.Init.StringTable[0] :
+ &mPcdDatabase->DxeDb.Init.StringTable[0]);
InternalData = PcdDb + Offset;
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
index a1367574b0..0671558b57 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
@@ -231,8 +231,8 @@ DisplayPageFrame (
Alignment < BANNER_COLUMNS + (UINT8) LocalScreen.LeftColumn;
Alignment++
) {
- RowIdx = Line - (UINT8) LocalScreen.TopRow;
- ColumnIdx = Alignment - (UINT8) LocalScreen.LeftColumn;
+ RowIdx = (UINT8) (Line - (UINT8) LocalScreen.TopRow);
+ ColumnIdx = (UINT8) (Alignment - (UINT8) LocalScreen.LeftColumn);
ASSERT (RowIdx < BANNER_HEIGHT);
ASSERT (ColumnIdx < BANNER_COLUMNS);