diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-09-15 07:48:11 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-09-15 07:48:11 +0000 |
commit | c9325700d0ef25eaf45077928af3f93b15ac5fe0 (patch) | |
tree | c46ae68c26db3a5a6a9e58b37b53265aa2f770d3 /MdeModulePkg/Universal/SmbiosDxe | |
parent | f6b4e53dfe43c27d448cedb57059e5b7ca236dd8 (diff) | |
download | edk2-platforms-c9325700d0ef25eaf45077928af3f93b15ac5fe0.tar.xz |
Refine soma code to make code run safely.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10877 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/SmbiosDxe')
-rw-r--r-- | MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c index f9ad65e14b..a3bb0a4752 100644 --- a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c +++ b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c @@ -379,7 +379,7 @@ SmbiosAdd ( // Build internal record Header
//
InternalRecord->Version = EFI_SMBIOS_RECORD_HEADER_VERSION;
- InternalRecord->HeaderSize = sizeof (EFI_SMBIOS_RECORD_HEADER);
+ InternalRecord->HeaderSize = (UINT16) sizeof (EFI_SMBIOS_RECORD_HEADER);
InternalRecord->RecordSize = RecordSize;
InternalRecord->ProducerHandle = ProducerHandle;
InternalRecord->NumberOfStrings = NumberOfStrings;
@@ -541,7 +541,7 @@ SmbiosUpdateString ( // Build internal record Header
//
InternalRecord->Version = EFI_SMBIOS_RECORD_HEADER_VERSION;
- InternalRecord->HeaderSize = sizeof (EFI_SMBIOS_RECORD_HEADER);
+ InternalRecord->HeaderSize = (UINT16) sizeof (EFI_SMBIOS_RECORD_HEADER);
InternalRecord->RecordSize = SmbiosEntry->RecordHeader->RecordSize + InputStrLen - TargetStrLen;
InternalRecord->ProducerHandle = SmbiosEntry->RecordHeader->ProducerHandle;
InternalRecord->NumberOfStrings = SmbiosEntry->RecordHeader->NumberOfStrings;
@@ -864,7 +864,7 @@ SmbiosCreateTable ( //
GetMaxSmbiosHandle(SmbiosProtocol, &SmbiosHandle);
EndStructure.Header.Type = EFI_SMBIOS_TYPE_END_OF_TABLE;
- EndStructure.Header.Length = sizeof(EFI_SMBIOS_TABLE_HEADER);
+ EndStructure.Header.Length = (UINT8) sizeof (EFI_SMBIOS_TABLE_HEADER);
EndStructure.Header.Handle = SmbiosHandle;
EndStructure.Tailing[0] = 0;
EndStructure.Tailing[1] = 0;
|