diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-08-12 07:26:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-08-12 07:26:11 +0000 |
commit | 3c315f0fff93aa072472abc10815963ac0035268 (patch) | |
tree | a95f6a96e0e7bd139c010f8dc60b40e5b3062a99 /parser/parser.c | |
parent | Adding upstream version 1.35.1. (diff) | |
download | netdata-3c315f0fff93aa072472abc10815963ac0035268.tar.xz netdata-3c315f0fff93aa072472abc10815963ac0035268.zip |
Adding upstream version 1.36.0.upstream/1.36.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | parser/parser.c | 4 |
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; |