Use DWORD for Structure table maximum size in SMBIOS3

Signed-off-by: Anton Arapov <arapov@gmail.com>
This commit is contained in:
Anton Arapov 2016-02-02 14:25:58 +01:00
parent 0a7886fefa
commit 4be5ff6a2e
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,33 @@
From ab02b117511230e46bbef7febbd854b9c832c13c Mon Sep 17 00:00:00 2001
From: Xie XiuQi <xiexiuqi@huawei.com>
Date: Mon, 1 Feb 2016 09:30:31 +0100
Subject: [PATCH 10/10] Use DWORD for Structure table maximum size in SMBIOS3
0Ch DWORD "Structure table maximum size"
Maximum size of SMBIOS Structure Table, pointed to by
the Structure Table Address, in bytes. The actual size is
guaranteed to be less or equal to the maximum size.
Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
---
dmidecode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dmidecode.c b/dmidecode.c
index b47c469..0c26685 100644
--- a/dmidecode.c
+++ b/dmidecode.c
@@ -4615,7 +4615,7 @@ static int smbios3_decode(u8 *buf, const char *devmem, u32 flags)
}
dmi_table(((off_t)offset.h << 32) | offset.l,
- WORD(buf + 0x0C), 0, ver, devmem, flags | FLAG_STOP_AT_EOT);
+ DWORD(buf + 0x0C), 0, ver, devmem, flags | FLAG_STOP_AT_EOT);
if (opt.flags & FLAG_DUMP_BIN)
{
--
2.5.0

View File

@ -16,6 +16,7 @@ Patch6: 0006-dmidecode-Introduce-SYS_FIRMWARE_DIR.patch
Patch7: 0007-Let-read_file-return-the-actual-data-size.patch
Patch8: 0008-dmidecode-Use-read_file-to-read-the-DMI-table-from-s.patch
Patch9: 0009-dmidecode-Check-sysfs-entry-point-length.patch
Patch10: 0010-Use-DWORD-for-Structure-table-maximum-size-in-SMBIOS.patch
BuildRequires: automake autoconf
ExclusiveArch: %{ix86} x86_64 ia64 aarch64
@ -41,6 +42,7 @@ I/O ports (e.g. serial, parallel, USB).
%patch7 -p1 -b .return_actual
%patch8 -p1 -b .read_file
%patch9 -p1 -b .sysfs_entry_check
%patch10 -p1 -b .dword
%build
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"
@ -61,6 +63,10 @@ make %{?_smp_mflags} DESTDIR=%{buildroot} prefix=%{_prefix} install-bin install-
%{_mandir}/man8/*
%changelog
* Tue Feb 02 2016 Anton Arapov <arapov@gmail.com> - 1:3.0-2
- Use DWORD for Structure table maximum size in SMBIOS3
- patched up to commit ab02b117511
* Thu Jan 21 2016 Anton Arapov <arapov@gmail.com> - 1:3.0-1
- dmidecode v3 patched up to commit e5c73239404