Ad Widget

Collapse

BUGFIX: Zabbix server crash on some agent errors

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gerco
    Junior Member
    • Nov 2006
    • 22

    #1

    BUGFIX: Zabbix server crash on some agent errors

    When the Zabbix 1.4.4 server receives an error from an agent or if the connection is dropped it tries to write the reason for the error in the hosts table. The error message is not checked for length and if the length exceeds the database table length (in PostgreSQL anyway), the zabbix server crashes. This quick patch fixes the problem:
    Code:
    diff -Naur zabbix-1.4.4/src/libs/zbxdbhigh/db.c zabbix/src/libs/zbxdbhigh/db.c
    --- zabbix-1.4.4/src/libs/zbxdbhigh/db.c        2007-12-17 14:18:59.000000000 +0100
    +++ zabbix/src/libs/zbxdbhigh/db.c      2008-01-23 19:38:56.375680763 +0100
    @@ -879,7 +879,7 @@
    
            if(error!=NULL)
            {
    -               DBescape_string(error,error_esc,MAX_STRING_LEN);
    +               DBescape_string(error,error_esc,HOST_ERROR_LEN);
            }
            else
            {
    Last edited by Gerco; 23-01-2008, 20:55.
Working...