From 0ddab761be249f54388c12f6cc8197dd01a63673 Mon Sep 17 00:00:00 2001 From: Disconnect3d Date: Mon, 13 Apr 2020 16:27:06 +0200 Subject: [PATCH] start-stop-daemon: Fix off by ones when checking for RC_* envvars The same as https://github.com/OpenRC/openrc/pull/361 This fixes #362. --- src/rc/start-stop-daemon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c index 99e5b6a0..6bc70685 100644 --- a/src/rc/start-stop-daemon.c +++ b/src/rc/start-stop-daemon.c @@ -864,8 +864,8 @@ int main(int argc, char **argv) TAILQ_FOREACH(env, env_list, entries) { if ((strncmp(env->value, "RC_", 3) == 0 && - strncmp(env->value, "RC_SERVICE=", 10) != 0 && - strncmp(env->value, "RC_SVCNAME=", 10) != 0) || + strncmp(env->value, "RC_SERVICE=", 11) != 0 && + strncmp(env->value, "RC_SVCNAME=", 11) != 0) || strncmp(env->value, "SSD_NICELEVEL=", 14) == 0 || strncmp(env->value, "SSD_IONICELEVEL=", 16) == 0) {