Skip to content

Commit

Permalink
[PATCH] 9p: fix marshalling bug in tcreate with empty extension field
Browse files Browse the repository at this point in the history
Signed-off-by: Russ Ross <[email protected]>
Signed-off-by: Eric Van Hensbergen <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Russ Ross authored and Linus Torvalds committed Jul 31, 2006
1 parent 0e31f51 commit 4c90c68
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fs/9p/conv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 4c90c68

Please sign in to comment.