Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndris Zeila <andris.zeila@zabbix.com>2021-05-08 11:48:07 +0300
committerAndris Zeila <andris.zeila@zabbix.com>2021-05-08 11:48:07 +0300
commite9615c2237ffe7368d071d93e68c8507df5ea91e (patch)
treee06221217b713735a04f680abf03a7e420b7b870 /src
parent587fcc32571b2a1e0cbacb9a19ee45cfce73a545 (diff)
........S. [ZBXNEXT-6452] fixed bitand parameter validation
Diffstat (limited to 'src')
-rw-r--r--src/libs/zbxserver/evalfunc2.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/libs/zbxserver/evalfunc2.c b/src/libs/zbxserver/evalfunc2.c
index 9b0a16f26eb..1a9e830a928 100644
--- a/src/libs/zbxserver/evalfunc2.c
+++ b/src/libs/zbxserver/evalfunc2.c
@@ -1816,14 +1816,11 @@ out:
* *
* Parameters: value - dynamic buffer *
* item - item (performance metric) *
- * parameters - up to 3 comma-separated fields: *
+ * parameters - to 2 comma-separated fields: *
* (1) same as the 1st parameter for function *
* evaluate_LAST() (see documentation of *
* trigger function last()), *
* (2) mask to bitwise AND with (mandatory), *
- * (3) same as the 2nd parameter for function *
- * evaluate_LAST() (see documentation of *
- * trigger function last()). *
* *
* Return value: SUCCEED - evaluated successfully, result is stored in 'value'*
* FAIL - failed to evaluate function *
@@ -1844,7 +1841,7 @@ static int evaluate_BITAND(zbx_variant_t *value, DC_ITEM *item, const char *para
goto clean;
}
- if (2 < (nparams = num_param(parameters)))
+ if (2 != (nparams = num_param(parameters)))
{
*error = zbx_strdup(*error, "invalid number of parameters");
goto clean;