[packages/dlm] Fix memory initialization in fence_config.c

jajcus jajcus at pld-linux.org
Fri Nov 2 08:34:00 CET 2012


commit d3afe32ae932fa71c98a90e923d35b04754d116a
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Fri Nov 2 08:33:03 2012 +0100

    Fix memory initialization in fence_config.c
    
    'fence_all' option of dlm_controld won't work properly without this.

 dlm-mem_init.patch | 11 +++++++++++
 dlm.spec           |  2 ++
 2 files changed, 13 insertions(+)
---
diff --git a/dlm.spec b/dlm.spec
index 3a1e8c8..a897131 100644
--- 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} \
diff --git a/dlm-mem_init.patch b/dlm-mem_init.patch
new file mode 100644
index 0000000..54c04f9
--- /dev/null
+++ b/dlm-mem_init.patch
@@ -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) {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/dlm.git/commitdiff/d3afe32ae932fa71c98a90e923d35b04754d116a



More information about the pld-cvs-commit mailing list