-
Problem report
-
Resolution: Fixed
-
Trivial
-
3.4.9rc1, 4.0.0alpha6
-
Sprint 33, Sprint 34
-
0.125
The code below increments pos in a loop while 0 != isdigit(next[pos]), but on the first iteration next[pos] is the same as *next and since the loop is placed inside if (0 != isdigit(*next)) it is guaranteed that at least one iteration of the loop and at least one pos++ will be executed. As a consequence if (0 == pos) block is logically dead.
/* process array index component */ if (0 != isdigit(*next)) { for (pos = 0; 0 != isdigit(next[pos]); pos++) ; if (0 == pos) return zbx_jsonpath_error(*pnext); ...
- caused by
-
ZBXNEXT-3863 Extend item preprocessing with jsonpath function
- Closed