]> git.pld-linux.org Git - packages/dlm.git/commitdiff
Fix memory initialization in fence_config.c
authorJacek Konieczny <j.konieczny@eggsoft.pl>
Fri, 2 Nov 2012 07:33:03 +0000 (08:33 +0100)
committerJacek Konieczny <jajcus@jajcus.net>
Fri, 2 Nov 2012 07:33:03 +0000 (08:33 +0100)
'fence_all' option of dlm_controld won't work properly without this.

dlm-mem_init.patch [new file with mode: 0644]
dlm.spec

diff --git a/dlm-mem_init.patch b/dlm-mem_init.patch
new file mode 100644 (file)
index 0000000..54c04f9
--- /dev/null
@@ -0,0 +1,11 @@
+diff -dur dlm-3.99.5.orig/dlm_controld/fence_config.c dlm-3.99.5/dlm_controld/fence_config.c
+--- dlm-3.99.5.orig/dlm_controld/fence_config.c        2012-06-21 23:53:56.000000000 +0200
++++ dlm-3.99.5/dlm_controld/fence_config.c     2012-11-02 08:31:53.000000000 +0100
+@@ -251,6 +251,7 @@
+                               rv = -ENOMEM;
+                               goto out;
+                       }
++                      memset(dev, 0, sizeof(struct fence_device));
+                       rv = sscanf(line, "%s %s %[^\n]s\n", dev->name, dev->agent, dev->args);
+                       if (rv < 2) {
index 3a1e8c8cb98d95c510a83ea3d757eacf11c944f5..a8971317d54dc0c7626b19f9aaa6bfb828591681 100644 (file)
--- a/dlm.spec
+++ b/dlm.spec
@@ -16,6 +16,7 @@ Source3:      %{name}.tmpfiles
 Patch0:                %{name}-link_order.patch
 Patch1:                %{name}-after_configfs.patch
 Patch2:                %{name}_stonith-build.patch
+Patch3:                %{name}-mem_init.patch
 URL:           http://sources.redhat.com/cluster/dlm/
 BuildRequires: corosync-devel
 %{?with_dlm_stonith:BuildRequires:     corosync-devel}
@@ -68,6 +69,7 @@ Pliki nagłówkowe i dokumentacja programisty dla DLM-a.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 %{__make} \
This page took 0.083746 seconds and 4 git commands to generate.