Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.4:Update
python-dmidecode.25117
fix-memory-Type-Detail-map-size.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-memory-Type-Detail-map-size.patch of Package python-dmidecode.25117
From 9ddb75c693238750c74c953b367c54d53b3a26e2 Mon Sep 17 00:00:00 2001 From: Marco Filippi <filippi@dei.unipd.it> Date: Fri, 17 Mar 2017 12:16:24 +0100 Subject: [PATCH] Fix memory Type Detail map size Bit mapped type descriptions array size must be kept coerent with bit mask, for index and array size in xml map otherwise nasty errors could arise. Problem discovered on a machine having <TypeDetails dmispec="7.18.3" flags="0x2080"> --- src/dmidecode.c | 4 ++-- src/pymap.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dmidecode.c b/src/dmidecode.c index 0f003c3..272d5a3 100644 --- a/src/dmidecode.c +++ b/src/dmidecode.c @@ -2905,9 +2905,9 @@ void dmi_memory_device_type_detail(xmlNode *node, u16 code) dmixml_AddAttribute(data_n, "dmispec", "7.18.3"); dmixml_AddAttribute(data_n, "flags", "0x%04x", code); - if((code & 0x1FFE) != 0) { + if((code & 0xFFFE) != 0) { int i; - for(i = 1; i <= 14; i++) { + for(i = 1; i <= 15; i++) { if(code & (1 << i)) { xmlNode *td_n = dmixml_AddTextChild(data_n, "flag", "%s", detail[i - 1]); assert( td_n != NULL ); diff --git a/src/pymap.xml b/src/pymap.xml index 7d5de70..7325a85 100644 --- a/src/pymap.xml +++ b/src/pymap.xml @@ -440,7 +440,7 @@ valuetype="string" value="concat(TotalWidth, ' ', TotalWidth/@unit)"/> <Map keytype="constant" key="AssetTag" valuetype="string" value="AssetTag"/> <Map keytype="constant" key="Type Detail" valuetype="list:string" value="TypeDetails/flag" - fixedsize="12" index_attr="index"/> + fixedsize="15" index_attr="index"/> <Map keytype="constant" key="Array Handle" valuetype="string" value="@ArrayHandle"/> <Map keytype="constant" key="Form Factor" valuetype="string" value="FormFactor"/> <Map keytype="constant" key="Size"
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor