summaryrefslogtreecommitdiffstats
path: root/parser/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'parser/parser.c')
-rw-r--r--parser/parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/parser/parser.c b/parser/parser.c
index 01256da4a..c37d1e2c4 100644
--- a/parser/parser.c
+++ b/parser/parser.c
@@ -9,7 +9,7 @@ static inline int find_keyword(char *str, char *keyword, int max_size, int (*cus
while (unlikely(custom_isspace(*s))) s++;
keyword_start = s;
- while (likely(*s && !custom_isspace(*s)) && max_size > 0) {
+ while (likely(*s && !custom_isspace(*s)) && max_size > 1) {
*keyword++ = *s++;
max_size--;
}
@@ -238,7 +238,7 @@ inline int parser_action(PARSER *parser, char *input)
{
PARSER_RC rc = PARSER_RC_OK;
char *words[PLUGINSD_MAX_WORDS] = { NULL };
- char command[PLUGINSD_LINE_MAX];
+ char command[PLUGINSD_LINE_MAX + 1];
keyword_function action_function;
keyword_function *action_function_list = NULL;