From cc9233960271fb86f93e0141988758ec5c9bbabc Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Mon, 12 Dec 2016 09:47:41 +0100 Subject: [PATCH] pwm command: Fix off-by-one in param parsing --- src/systemcmds/pwm/pwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/systemcmds/pwm/pwm.c b/src/systemcmds/pwm/pwm.c index dfe944fc14..a2bbbcf920 100644 --- a/src/systemcmds/pwm/pwm.c +++ b/src/systemcmds/pwm/pwm.c @@ -122,7 +122,7 @@ get_parameter_value(const char *option, const char *paramDescription) if (strncmp("p:", option, 2) == 0) { char paramName[32]; - strncpy(paramName, option + 2, 16); + strncpy(paramName, option + 2, 17); /* user wants to use a param name */ param_t parm = param_find(paramName);