-
Incident report
-
Resolution: Fixed
-
Minor
-
None
-
Sprint 1
In src/libs/zbxserver/evalfunc.c add_value_suffix_normal() uses the following expressions to check if a value has no fractional part:
if (SUCCEED != zbx_double_compare((int)(value_double + 0.5), value_double))
Converting double to int may cause overflow and lead to unexpected results.
A more delicate way of doing the same thing:
if (SUCCEED != zbx_double_compare(round(value_double) - value_double, 0.0))