From b64dbbf8d0698b955d12f4731fd8194c6f528da4 Mon Sep 17 00:00:00 2001 From: Robert Andersson Date: Fri, 19 Oct 2018 16:20:23 +0200 Subject: [PATCH] fix condition string lengths Signed-off-by: Robert Andersson --- src/cond.c | 4 ++-- src/initctl.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cond.c b/src/cond.c index 38c62348..842d50e0 100644 --- a/src/cond.c +++ b/src/cond.c @@ -101,7 +101,7 @@ enum cond_state cond_get_agg(const char *names) { char *cond; enum cond_state s = COND_ON; - static char conds[MAX_ARG_LEN]; + static char conds[MAX_COND_LEN]; if (!names) return COND_ON; @@ -116,7 +116,7 @@ enum cond_state cond_get_agg(const char *names) int cond_affects(const char *name, const char *names) { char *cond; - static char conds[MAX_ARG_LEN]; + static char conds[MAX_COND_LEN]; if (!name || !names) return 0; diff --git a/src/initctl.c b/src/initctl.c index abb76fb4..eaf23e78 100644 --- a/src/initctl.c +++ b/src/initctl.c @@ -173,7 +173,7 @@ static int do_restart(char *arg) { return do_startstop(INIT_CMD_RESTART_SVC, arg static void show_cond_one(const char *_conds) { - static char conds[MAX_ARG_LEN]; + static char conds[MAX_COND_LEN]; char *cond; strlcpy(conds, _conds, sizeof(conds));