public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: David Teigland <teigland@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: RHEL4 - dlm-kernel: ensure lockspace name is nul terminated
Date: Tue, 19 Aug 2008 17:20:00 -0000	[thread overview]
Message-ID: <20080819171741.47BAF1202A5@lists.fedorahosted.org> (raw)

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 */


                 reply	other threads:[~2008-08-19 17:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080819171741.47BAF1202A5@lists.fedorahosted.org \
    --to=teigland@fedoraproject.org \
    --cc=cluster-cvs-relay@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).