summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-12-11 05:51:39 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-12-11 05:51:39 +0000
commit351615ee5ee9b7f7255c6b2075efd31854070619 (patch)
treecc54bee7f680fe9ff8e967e619dd6561521626a5 /IntelFrameworkModulePkg
parent65d02573b86a8008df6e3a4d1fa960f3858011a1 (diff)
downloadedk2-platforms-351615ee5ee9b7f7255c6b2075efd31854070619.tar.xz
The consumer for smbios recorder should *not* make assumption the SMBIOS structure in special version. For length of smbios record, consumer need judge the SMBIOS->Hdr.Length but not use size of (SMBIOS_TYPE0) style.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9553 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg')
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c b/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
index 55a988467f..bd0919b806 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
@@ -749,7 +749,7 @@ UpdateFrontPageStrings (
if (Record->Type == EFI_SMBIOS_TYPE_BIOS_INFORMATION) {
Type0Record = (SMBIOS_TABLE_TYPE0 *) Record;
StrIndex = Type0Record->BiosVersion;
- GetOptionalStringByIndex ((CHAR8*)(Type0Record+1), StrIndex, &NewString);
+ GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type0Record + Type0Record->Hdr.Length + 1), StrIndex, &NewString);
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_BIOS_VERSION);
HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
FreePool (NewString);
@@ -759,7 +759,7 @@ UpdateFrontPageStrings (
if (Record->Type == EFI_SMBIOS_TYPE_SYSTEM_INFORMATION) {
Type1Record = (SMBIOS_TABLE_TYPE1 *) Record;
StrIndex = Type1Record->ProductName;
- GetOptionalStringByIndex ((CHAR8*)(Type1Record+1), StrIndex, &NewString);
+ GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type1Record + Type1Record->Hdr.Length + 1), StrIndex, &NewString);
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_COMPUTER_MODEL);
HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
FreePool (NewString);
@@ -769,7 +769,7 @@ UpdateFrontPageStrings (
if (Record->Type == EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION) {
Type4Record = (SMBIOS_TABLE_TYPE4 *) Record;
StrIndex = Type4Record->ProcessorVersion;
- GetOptionalStringByIndex ((CHAR8*)(Type4Record+1), StrIndex, &NewString);
+ GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type4Record + Type4Record->Hdr.Length + 1), StrIndex, &NewString);
TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_CPU_MODEL);
HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL);
FreePool (NewString);