summaryrefslogtreecommitdiffstats
path: root/parser/parser.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-08-12 07:26:17 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-08-12 07:26:17 +0000
commit7877a98bd9c00db5e81dd2f8c734cba2bab20be7 (patch)
treed18b767250f7c7ced9b8abe2ece784ac1fe24d3e /parser/parser.c
parentReleasing debian version 1.35.1-2. (diff)
downloadnetdata-7877a98bd9c00db5e81dd2f8c734cba2bab20be7.tar.xz
netdata-7877a98bd9c00db5e81dd2f8c734cba2bab20be7.zip
Merging upstream version 1.36.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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 01256da4..c37d1e2c 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;