This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
RHEL47 - dlm-kernel: ensure lockspace name is nul terminated
- From: David Teigland <teigland at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Tue, 19 Aug 2008 17:18:51 +0000 (UTC)
- Subject: RHEL47 - dlm-kernel: ensure lockspace name is nul terminated
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=d8417ee4673aa8c07f9d314704000e248081416b
Commit: d8417ee4673aa8c07f9d314704000e248081416b
Parent: 36ccb96c5c37c3f6216c7ff1f7f97e81321cfcd5
Author: David Teigland <teigland@redhat.com>
AuthorDate: Tue Aug 19 12:01:23 2008 -0500
Committer: David Teigland <teigland@redhat.com>
CommitterDate: Tue Aug 19 12:09:50 2008 -0500
dlm-kernel: ensure lockspace name is nul terminated
bz 458762 (rhel-4.8)
bz 458761 (rhel-4.7.z)
Signed-off-by: David Teigland <teigland@redhat.com>
---
dlm-kernel/src/device.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlm-kernel/src/device.c b/dlm-kernel/src/device.c
index 634a8f3..18e43db 100644
--- a/dlm-kernel/src/device.c
+++ b/dlm-kernel/src/device.c
@@ -1121,9 +1121,10 @@ static ssize_t dlm_write(struct file *file, const char __user *buffer,
if (fi && test_bit(LS_FLAG_DELETED, &fi->fi_ls->ls_flags))
return -ENOENT;
- kparams = kmalloc(count, GFP_KERNEL);
+ kparams = kmalloc(count + 1, GFP_KERNEL);
if (!kparams)
return -ENOMEM;
+ memset(kparams, 0, count + 1);
status = -EFAULT;
/* Get the command info */