PDA

View Full Version : SNMP polling of ip address values segfault in 1.1beta7


zarath
24-03-2006, 12:56
There is a glitch in check_snmp.c,

char *ip is not assigned in line 370.

so i added the comment line a few line above prior to the sprintf:

--- zabbix-1.1beta7.orig/src/zabbix_server/poller/checks_snmp.c
+++ zabbix-1.1beta7/src/zabbix_server/poller/checks_snmp.c
@@ -367,6 +367,7 @@
p = malloc(16);
if(p)
{
+ ip = vars->val.string;
snprintf(p,MAX_STRING_LEN-1,"%d.%d.%d.%d",ip[0],ip[1],ip[2],ip[3]);
SET_STR_RESULT(value, p);

---------------------

ciao
Holger