mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Van Hensbergen <ericvh@hera.kernel.org>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org,
	v9fs-developer@lists.sourceforge.net, ericvh@gmail.com
Subject: [PATCH] 9p: fix marshalling bug in tcreate with empty extension field
Date: Fri, 28 Jul 2006 18:24:21 GMT	[thread overview]
Message-ID: <200607281824.k6SIOLfq013114@hera.kernel.org> (raw)

>From c4610f24dbaa1fbd2e1c15162b76200a2ac40204 Mon Sep 17 00:00:00 2001
From: Eric Van Hensbergen <ericvh@ericvh-laptop.(none)>
Date: Fri, 28 Jul 2006 13:18:35 -0500
Subject: [PATCH] marshalling bug in tcreate with empty extension field

Signed-off-by: Russ Ross <russross@gmail.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
---
 fs/9p/conv.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/9p/conv.c b/fs/9p/conv.c
index 1e89814..56d88c1 100644
--- a/fs/9p/conv.c
+++ b/fs/9p/conv.c
@@ -673,8 +673,10 @@ struct v9fs_fcall *v9fs_create_tcreate(u
 	struct cbuf *bufp = &buffer;
 
 	size = 4 + 2 + strlen(name) + 4 + 1;	/* fid[4] name[s] perm[4] mode[1] */
-	if (extended && extension!=NULL)
-		size += 2 + strlen(extension);	/* extension[s] */
+	if (extended) {
+		size += 2 +			/* extension[s] */
+		    (extension == NULL ? 0 : strlen(extension));
+	}
 
 	fc = v9fs_create_common(bufp, size, TCREATE);
 	if (IS_ERR(fc))
-- 
1.4.2.rc1.g83e1


                 reply	other threads:[~2006-07-28 18:24 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=200607281824.k6SIOLfq013114@hera.kernel.org \
    --to=ericvh@hera.kernel.org \
    --cc=akpm@osdl.org \
    --cc=ericvh@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=v9fs-developer@lists.sourceforge.net \
    /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

Powered by JetHome