* [PATCH] chunkd: fix debug output when the request key is not null-terminated
@ 2010-03-16 2:02 Akinobu Mita
2010-03-16 4:32 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Akinobu Mita @ 2010-03-16 2:02 UTC (permalink / raw)
To: hail-devel; +Cc: Akinobu Mita
If the request key is not null-terminated and the debug output is enabled,
it prints invalid and unsafe value. Add a precision to fix it.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
server/server.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/server/server.c b/server/server.c
index 4d9a09e..5b34725 100644
--- a/server/server.c
+++ b/server/server.c
@@ -1053,9 +1053,10 @@ static bool cli_evt_exec_req(struct client *cli, unsigned int events)
goto err_out;
if (debugging)
- applog(LOG_DEBUG, "REQ(op %s, key %s (%u), user %s) "
+ applog(LOG_DEBUG, "REQ(op %s, key %.*s (%u), user %s) "
"seq %x len %lld login %s",
op2str(req->op),
+ cli->key_len,
cli->key,
cli->key_len,
cli->user,
--
1.6.5.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-16 4:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-16 2:02 [PATCH] chunkd: fix debug output when the request key is not null-terminated Akinobu Mita
2010-03-16 4:32 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox