-
Problem report
-
Resolution: Fixed
-
Major
-
4.0.1
-
GNU/Linux
-
Sprint 46, Nov 2018
-
0.125
If a logrt[] or logrt.count[] item is used with incorrect regular expression for file name (e.g. logrt[/home/zabbix40/test.log.*\,.*]') then compile_filename_regexp() prints a part of error message from uninitialized buffer.
For example in frontend user might see:
Cannot compile a regular expression describing filename pattern: Б́
instead of
Cannot compile a regular expression describing filename pattern: \ at end of pattern
Possible fix:
Index: src/zabbix_agent/logfiles.c =================================================================== --- src/zabbix_agent/logfiles.c (revision 86279) +++ src/zabbix_agent/logfiles.c (working copy) @@ -1533,8 +1533,8 @@ * * * Parameters: * * filename_regexp - [IN] regexp to be compiled * - * re - [OUT] compiled regexp * - * err_msg - [OUT] error message why regexp could not be * + * re - [OUT] compiled regexp * + * err_msg - [OUT] error message why regexp could not be * * compiled * * * * Return value: SUCCEED or FAIL * @@ -1546,10 +1546,8 @@ if (SUCCEED != zbx_regexp_compile(filename_regexp, re, ®exp_err)) { - char err_buf[MAX_STRING_LEN]; - *err_msg = zbx_dsprintf(*err_msg, "Cannot compile a regular expression describing filename pattern: %s", - err_buf); + regexp_err); return FAIL; }
- caused by
-
ZBX-13730 High CPU / Faliure to Match REGEX
- Closed