Skip to content

Commit

Permalink
[PATCH] 9p: null terminate error strings for debug print
Browse files Browse the repository at this point in the history
We weren't properly NULL terminating protocol error strings for our debug
printk resulting in garbage being included in the output when debug was
enabled.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Eric Van Hensbergen authored and Linus Torvalds committed Jan 26, 2007
1 parent da977b2 commit e540eb4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/9p/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ int v9fs_errstr2errno(char *errstr, int len)

if (errno == 0) {
/* TODO: if error isn't found, add it dynamically */
errstr[len] = 0;
printk(KERN_ERR "%s: errstr :%s: not found\n", __FUNCTION__,
errstr);
errno = 1;
Expand Down

0 comments on commit e540eb4

Please sign in to comment.