From 51c5f3cbfaf8c8d112f39bf01b0992f6d88c7229 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Mon, 23 Oct 2017 19:19:36 +0200 Subject: [PATCH] Length of the ANSI escaped runlevels string is 20 chars, need 21 Problem reported by @wkz Signed-off-by: Joachim Nilsson --- src/initctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/initctl.c b/src/initctl.c index ad8157e6..dc36fa70 100644 --- a/src/initctl.c +++ b/src/initctl.c @@ -431,7 +431,7 @@ static int show_version(char *arg) char *runlevel_string(int runlevel, int levels) { int i, pos = 1; - static char lvl[20]; + static char lvl[21]; memset(lvl, 0, sizeof(lvl)); lvl[0] = '[';