RHEL4 - dlm-kernel: ensure lockspace name is nul terminated
David Teigland
teigland@fedoraproject.org
Tue Aug 19 17:20:00 GMT 2008
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=a479ddb2fa97033ce44ce11ae28925c55b176a55
Commit: a479ddb2fa97033ce44ce11ae28925c55b176a55
Parent: c8858b18d8262a84615b38eb26fa8351269b01f3
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:01:23 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 */
More information about the Cluster-cvs
mailing list