From ef1ecb823c0be68cd0bb5529d9f9578db9f2165e Mon Sep 17 00:00:00 2001
From: "Hon Ching(Vicky) Lo" <honclo@linux.vnet.ibm.com>
Date: Thu, 8 Sep 2016 01:22:16 -0400
Subject: [PATCH 24/28] [PATCH] Fix uninitialized memory error

Fix access to uninitialized memory in src/tcsd/platform.c
platform_get_runlevel() Solaris implementation. Error found by
Parfait static code analyzer.

Signed-off-by: Dan Anderson <dananderson8@users.sourceforge.net>

From https://sourceforge.net/p/trousers/trousers/ci/ef1ecb823c0be68cd0bb5529d9f9578db9f2165e
---
 src/tcsd/platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tcsd/platform.c b/src/tcsd/platform.c
index 8d7d96c..c9d5db0 100644
--- a/src/tcsd/platform.c
+++ b/src/tcsd/platform.c
@@ -113,7 +113,7 @@ MUTEX_DECLARE_INIT(utmp_lock);
 char
 platform_get_runlevel()
 {
-	char runlevel;
+	char runlevel = 'u';	/* unknown run level */
 	struct utmpx ut, *utp = NULL;
 
 	MUTEX_LOCK(utmp_lock);
-- 
1.8.3.1

