[python-dmidecode] duplicate installed attribute

aledvink aledvink at fedoraproject.org
Thu Jun 20 13:38:05 UTC 2013


commit 796c60d358e8d950d7566bdac8e96c81ea0da160
Author: Ales Ledvinka <aledvink at redhat.com>
Date:   Thu Jun 20 15:36:57 2013 +0200

    duplicate installed attribute

 installed-invalid.patch |   31 +++++++++++++++++++++++++++++++
 python-dmidecode.spec   |   10 ++++++++--
 2 files changed, 39 insertions(+), 2 deletions(-)
---
diff --git a/installed-invalid.patch b/installed-invalid.patch
new file mode 100644
index 0000000..e318883
--- /dev/null
+++ b/installed-invalid.patch
@@ -0,0 +1,31 @@
+From 69a1c9ca658c9708698cde6aee32af7bb2e16f9a Mon Sep 17 00:00:00 2001
+From: David Sommerseth <davids at redhat.com>
+Date: Thu, 20 Jun 2013 12:58:12 +0200
+Subject: [PATCH] Fixed a missing break statement in a switch for DMI section
+ 3.3.7.2
+
+This missing break could cause duplicated 'installed' attributes in
+<InstalledSize/> or <EnabledSize/> XML tags.  This is only happening
+when dmi_memory_module_size() is called and only on some hardware.
+
+Signed-off-by: David Sommerseth <davids at redhat.com>
+---
+ src/dmidecode.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/dmidecode.c b/src/dmidecode.c
+index 215c3f4..dae2fef 100644
+--- a/src/dmidecode.c
++++ b/src/dmidecode.c
+@@ -1516,6 +1516,7 @@ void dmi_memory_module_size(xmlNode *node, const char *tagname, u8 code)
+         case 0x7F:
+                 dmixml_AddAttribute(data_n, "installed", "0");
+                 check_conn = 0;
++                break;
+         default:
+                 dmixml_AddAttribute(data_n, "installed", "1");
+                 dmixml_AddAttribute(data_n, "unit", "MB");
+-- 
+1.7.10.2
+
+
diff --git a/python-dmidecode.spec b/python-dmidecode.spec
index 3ecdd32..fbd6dad 100644
--- a/python-dmidecode.spec
+++ b/python-dmidecode.spec
@@ -4,7 +4,7 @@
 Summary: Python module to access DMI data
 Name: python-dmidecode
 Version: 3.10.13
-Release: 8%{?dist}
+Release: 9%{?dist}
 License: GPLv2
 Group: System Environment/Libraries
 URL: http://projects.autonomy.net.au/python-dmidecode/
@@ -18,8 +18,10 @@ BuildRequires: python-devel
 
 # already in restored upstream git
 Patch1: SIGILL-catcher.patch
-# email upstream why not in git
+# email: upstream why not in git, planed for release
 Patch2: dmispec-remove.patch
+# email: git postponed but planned for release
+Patch3: installed-invalid.patch
 
 %description
 python-dmidecode is a python extension module that uses the
@@ -30,6 +32,7 @@ as python data structures or as XML data using libxml2.
 %setup -q
 %patch1 -p1 -b .SIGILL-catcher
 %patch2 -p1 -b .dmispec-remove
+%patch3 -p1 -b .install-invalid
 
 %build
 make build
@@ -57,6 +60,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/python-dmidecode/
 
 %changelog
+* Mon Jun 20 2013 Ales Ledvinka <aledvink at redhat.com> - 3.10.13-9
+- Attribute installed may appear as duplicate and cause invalid XML.
+
 * Mon Jun 17 2013 Ales Ledvinka <aledvink at redhat.com> - 3.10.13-8
 - Attribute dmispec may cause invalid XML on some hardware.
 - Signal handler for SIGILL.


More information about the scm-commits mailing list