From b45035ee1466ea39de4d91aa0916d1237b10f709 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Wed, 25 Jan 2012 22:17:57 +0000 Subject: [PATCH] Test for uname result in fail path initialize to 0. --- WHATS_NEW | 1 + daemons/clvmd/clvmd-command.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW b/WHATS_NEW index 6613e32a4..900edfd23 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.89 - ================================== + Add missing check for uname result in clvmd TEST processing. Fix memleak in target_version() error path (unsupported LIST_VERSIONS). Limit alignment to 32bit values. Check for correctness of uint64 dev_size value. diff --git a/daemons/clvmd/clvmd-command.c b/daemons/clvmd/clvmd-command.c index 05b699716..cdfaea081 100644 --- a/daemons/clvmd/clvmd-command.c +++ b/daemons/clvmd/clvmd-command.c @@ -99,7 +99,9 @@ int do_command(struct local_client *client, struct clvm_header *msg, int msglen, *buf = new_buf; } if (*buf) { - uname(&nodeinfo); + if (uname(&nodeinfo)) + memset(&nodeinfo, 0, sizeof(nodeinfo)); + *retlen = 1 + dm_snprintf(*buf, buflen, "TEST from %s: %s v%s", nodeinfo.nodename, args,