* [PATCH] 9p: null terminate error strings for debug print
@ 2007-01-23 1:36 Eric Van Hensbergen
0 siblings, 0 replies; only message in thread
From: Eric Van Hensbergen @ 2007-01-23 1:36 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, v9fs-developer, Eric Van Hensbergen,
Eric Van Hensbergen
From: Eric Van Hensbergen <ericvh@strongmad.texas.9grid.us> - unquoted
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>
---
fs/9p/error.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/fs/9p/error.c b/fs/9p/error.c
index ae91555..0d7fa4e 100644
--- a/fs/9p/error.c
+++ b/fs/9p/error.c
@@ -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;
--
1.5.0.rc1.gde38
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-01-23 1:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-23 1:36 [PATCH] 9p: null terminate error strings for debug print Eric Van Hensbergen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox