summaryrefslogtreecommitdiffstats
path: root/fs/9p/conv.c
diff options
context:
space:
mode:
authorRuss Ross <russross@gmail.com>2006-07-30 03:04:15 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-31 13:28:44 -0700
commit4c90c68aca278f425afc0b48d86298b960fbc0ce (patch)
tree4c2ba4152b1d58e7b899b01ffe7fe3624498b1c5 /fs/9p/conv.c
parent0e31f51d8177320d61ec5786ca4aafa7b7a749b4 (diff)
downloadop-kernel-dev-4c90c68aca278f425afc0b48d86298b960fbc0ce.zip
op-kernel-dev-4c90c68aca278f425afc0b48d86298b960fbc0ce.tar.gz
[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>
Diffstat (limited to 'fs/9p/conv.c')
-rw-r--r--fs/9p/conv.c6
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(u32 fid, char *name, u32 perm, u8 mode,
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))
OpenPOWER on IntegriCloud