sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master grimoire by Florian Franzmann (13a47addc934cd7f1655a6ef7ba03a7e477505ca)
- From: Florian Franzmann <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master grimoire by Florian Franzmann (13a47addc934cd7f1655a6ef7ba03a7e477505ca)
- Date: Sun, 20 Dec 2009 05:31:24 -0600
GIT changes to master grimoire by Florian Franzmann
<siflfran AT hawo.stw.uni-erlangen.de>:
disk/mdadm/DETAILS | 1
disk/mdadm/HISTORY | 5
disk/mdadm/PRE_BUILD | 3
disk/mdadm/mdadm-3.0.2-fix-null-dereference-in-set_member_info.patch | 51
++++++++++
4 files changed, 60 insertions(+)
New commits:
commit 13a47addc934cd7f1655a6ef7ba03a7e477505ca
Author: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
Commit: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
disk/mdadm: added patch from gentoo to fix segfault
diff --git a/disk/mdadm/DETAILS b/disk/mdadm/DETAILS
index 210be91..102e1f9 100755
--- a/disk/mdadm/DETAILS
+++ b/disk/mdadm/DETAILS
@@ -1,5 +1,6 @@
SPELL=mdadm
VERSION=3.0.2
+ PATCHLEVEL=1
SOURCE=$SPELL-$VERSION.tar.bz2
SOURCE2=$SOURCE.sign
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
diff --git a/disk/mdadm/HISTORY b/disk/mdadm/HISTORY
index cbf156b..1e164d5 100644
--- a/disk/mdadm/HISTORY
+++ b/disk/mdadm/HISTORY
@@ -1,3 +1,8 @@
+2009-12-20 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
+ * PRE_BUILD,
mdadm-3.0.2-fix-null-dereference-in-set_member_info.patch:
+ added patch from gentoo to fix segfault
+ * DETAILS: PATCHLEVEL++
+
2009-10-04 Ladislav Hagara <hgr AT vabo.cz>
* DETAILS: 3.0.2
diff --git a/disk/mdadm/PRE_BUILD b/disk/mdadm/PRE_BUILD
new file mode 100755
index 0000000..0918786
--- /dev/null
+++ b/disk/mdadm/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd ${SOURCE_DIRECTORY} &&
+patch -p1 <
${SCRIPT_DIRECTORY}/mdadm-3.0.2-fix-null-dereference-in-set_member_info.patch
diff --git
a/disk/mdadm/mdadm-3.0.2-fix-null-dereference-in-set_member_info.patch
b/disk/mdadm/mdadm-3.0.2-fix-null-dereference-in-set_member_info.patch
new file mode 100644
index 0000000..c740421
--- /dev/null
+++ b/disk/mdadm/mdadm-3.0.2-fix-null-dereference-in-set_member_info.patch
@@ -0,0 +1,51 @@
+http://bugs.gentoo.org/287338
+
+From 2b9aa337af7291d3f141322da96c9f667c99d53c Mon Sep 17 00:00:00 2001
+From: NeilBrown <neilb AT suse.de>
+Date: Thu, 1 Oct 2009 12:51:04 +1000
+Subject: [PATCH] Fix null-dereference in set_member_info
+
+set_member_info would try to dereference ->metadata_version, without
+checking that it isn't NULL.
+
+Signed-off-by: NeilBrown <neilb AT suse.de>
+---
+ mapfile.c | 15 +++++++++------
+ 1 files changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/mapfile.c b/mapfile.c
+index a3038be..ed59db5 100644
+--- a/mapfile.c
++++ b/mapfile.c
+@@ -303,19 +303,22 @@ struct map_ent *map_by_name(struct map_ent **map, char
*name)
+ */
+ static void set_member_info(struct supertype *st, struct mdstat_ent *ent)
+ {
+- char version[strlen(ent->metadata_version)+1];
+
+ st->subarray[0] = '\0';
+
+- if (strncmp(ent->metadata_version, "external:", 9) != 0)
++ if (ent->metadata_version == NULL ||
++ strncmp(ent->metadata_version, "external:", 9) != 0)
+ return;
+
+- strcpy(version, ent->metadata_version);
+-
+- if (is_subarray(&version[9])) {
+- char *subarray = strrchr(version, '/');
++ if (is_subarray(&ent->metadata_version[9])) {
++ char version[strlen(ent->metadata_version)+1];
++ char *subarray;
+ char *name = &version[10];
+
++ strcpy(version, ent->metadata_version);
++ subarray = strrchr(version, '/');
++ name = &version[10];
++
+ if (!subarray)
+ return;
+ *subarray++ = '\0';
+--
+1.6.5.rc2
+
- [SM-Commit] GIT changes to master grimoire by Florian Franzmann (13a47addc934cd7f1655a6ef7ba03a7e477505ca), Florian Franzmann, 12/20/2009
Archive powered by MHonArc 2.6.24.