[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git-commits-head
Subject:    [PATCH] 9p: fix marshalling bug in tcreate with empty extension field
From:       Linux Kernel Mailing List <linux-kernel () vger ! kernel ! org>
Date:       2006-07-31 21:00:53
Message-ID: 200607312100.k6VL0r2o014286 () hera ! kernel ! org
[Download RAW message or body]

commit 4c90c68aca278f425afc0b48d86298b960fbc0ce
tree 4c2ba4152b1d58e7b899b01ffe7fe3624498b1c5
parent 0e31f51d8177320d61ec5786ca4aafa7b7a749b4
author Russ Ross <russross@gmail.com> Sun, 30 Jul 2006 17:04:15 -0700
committer Linus Torvalds <torvalds@g5.osdl.org> Tue, 01 Aug 2006 03:28:44 -0700

[PATCH] 9p: fix 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>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

 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))
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic