diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-13 05:20:55 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-13 05:20:55 +0000 |
commit | 1fef733cc7f33adaabdb7becc9c03fab2f41b8a3 (patch) | |
tree | 1d712bd752f23cbce45a14904a52b70b5c12fd23 /MdeModulePkg | |
parent | 2fead09fae17666cf82bcfeb38425af3adcbe646 (diff) | |
download | edk2-1fef733cc7f33adaabdb7becc9c03fab2f41b8a3.zip edk2-1fef733cc7f33adaabdb7becc9c03fab2f41b8a3.tar.gz edk2-1fef733cc7f33adaabdb7becc9c03fab2f41b8a3.tar.bz2 |
Fix security check.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7519 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/PCD/Dxe/Service.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.c b/MdeModulePkg/Universal/PCD/Dxe/Service.c index 71e9239..f07c107 100644 --- a/MdeModulePkg/Universal/PCD/Dxe/Service.c +++ b/MdeModulePkg/Universal/PCD/Dxe/Service.c @@ -123,8 +123,8 @@ GetWorker ( VariableHead = (VARIABLE_HEAD *) (PcdDb + Offset);
- Guid = &(GuidTable[VariableHead->GuidTableIndex]);
- Name = &(StringTable[VariableHead->StringIndex]);
+ Guid = GuidTable + VariableHead->GuidTableIndex;
+ Name = StringTable + VariableHead->StringIndex;
VaraiableDefaultBuffer = (UINT8 *) PcdDb + VariableHead->DefaultValueOffset;
Status = GetHiiVariable (Guid, Name, &Data, &DataSize);
@@ -154,7 +154,7 @@ GetWorker ( case PCD_TYPE_STRING:
StringTableIdx = (UINT16) *((UINT8 *) PcdDb + Offset);
- RetPtr = (VOID *) &StringTable[StringTableIdx];
+ RetPtr = (VOID *) (StringTable + StringTableIdx);
break;
case PCD_TYPE_DATA:
@@ -774,7 +774,7 @@ SetWorker ( case PCD_TYPE_STRING:
if (SetPtrTypeSize (TmpTokenNumber, Size)) {
- CopyMem (&StringTable[*((UINT16 *)InternalData)], Data, *Size);
+ CopyMem (StringTable + *((UINT16 *)InternalData), Data, *Size);
Status = EFI_SUCCESS;
} else {
Status = EFI_INVALID_PARAMETER;
@@ -794,8 +794,8 @@ SetWorker ( VariableHead = (VARIABLE_HEAD *) (PcdDb + Offset);
- Guid = &(GuidTable[VariableHead->GuidTableIndex]);
- Name = &(StringTable[VariableHead->StringIndex]);
+ Guid = GuidTable + VariableHead->GuidTableIndex;
+ Name = StringTable + VariableHead->StringIndex;
VariableOffset = VariableHead->Offset;
Status = SetHiiVariable (Guid, Name, Data, *Size, VariableOffset);
|