-
Incident report
-
Resolution: Fixed
-
Trivial
-
2.2.12rc1, 2.4.8rc1, 3.0.0alpha6
-
None
In src/libs/zbxcommon/str.c in zbx_strarr_init() we have char ***arr and
*arr = zbx_malloc(*arr, sizeof(char **));
Similar situation in zbx_strarr_add():
*arr = zbx_realloc(*arr, sizeof(char **) * (i + 2));
Type of *arr is char ** and it points to char *. Therefore sizeof(char **) should be replaced with sizeof(char *).
CID 118948 and CID 118911.