summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-fs/mdadm/files/mdadm-2.2-update-segv.patch')
-rw-r--r--sys-fs/mdadm/files/mdadm-2.2-update-segv.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/sys-fs/mdadm/files/mdadm-2.2-update-segv.patch b/sys-fs/mdadm/files/mdadm-2.2-update-segv.patch
new file mode 100644
index 000000000000..1c1e37ecf4b2
--- /dev/null
+++ b/sys-fs/mdadm/files/mdadm-2.2-update-segv.patch
@@ -0,0 +1,16 @@
+Fix segfault when update is NULL
+
+http://bugs.gentoo.org/119245
+http://www.mail-archive.com/linux-raid@vger.kernel.org/msg03242.html
+
+--- Assemble.c
++++ Assemble.c
+@@ -219,7 +219,7 @@
+ }
+ if (dfd >= 0) close(dfd);
+
+- if (ident->uuid_set && (!update && strcmp(update, "uuid")!= 0) &&
++ if (ident->uuid_set && update && strcmp(update, "uuid")!= 0 &&
+ (!super || same_uuid(info.uuid, ident->uuid, tst->ss->swapuuid)==0)) {
+ if ((inargv && verbose >= 0) || verbose > 0)
+ fprintf(stderr, Name ": %s has wrong uuid.\n",