All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] dlm_tool: Trimming garbages at in Expecting reply output
@ 2013-05-02 12:19 Masatake YAMATO
  2013-05-02 13:53 ` David Teigland
  0 siblings, 1 reply; 3+ messages in thread
From: Masatake YAMATO @ 2013-05-02 12:19 UTC (permalink / raw)
  To: cluster-devel.redhat.com

The buffer used in "Expecting reply" of dlm_tool lockdebug output is
used as C string (via printf %s) but not terminated with nul char.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
---
 dlm/tool/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlm/tool/main.c b/dlm/tool/main.c
index 4752008..a404be3 100644
--- a/dlm/tool/main.c
+++ b/dlm/tool/main.c
@@ -822,7 +822,7 @@ static void do_waiters(char *name, struct summary *sum)
 		/* parse the resource name from the remainder of the line */
 		j = 0;
 		spaces = 0;
-
+		memset(rname, 0, sizeof(rname));
 		for (i = 0; i < LOCK_LINE_MAX; i++) {
 			if (line[i] == '\n')
 				break;
-- 
1.7.11.7



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-02 14:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-02 12:19 [Cluster-devel] [PATCH] dlm_tool: Trimming garbages at in Expecting reply output Masatake YAMATO
2013-05-02 13:53 ` David Teigland
2013-05-02 14:31   ` Masatake YAMATO

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.