From: Marc Fournier Date: Tue, 19 Aug 2014 11:54:53 +0000 (+0200) Subject: openldap: terminate attrs array with NULL X-Git-Tag: collectd-5.5.0~152^2~12 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=c640e2c73d62842239477679e80179a2df7698cf;p=collectd.git openldap: terminate attrs array with NULL ... as mentioned in ldap_search_ext_s(3). This fixes a segfault when building with -O2. --- diff --git a/src/openldap.c b/src/openldap.c index 7ce789fb..e6e1c646 100644 --- a/src/openldap.c +++ b/src/openldap.c @@ -177,14 +177,15 @@ static int ldap_read_host (user_data_t *ud) /* {{{ */ int rc; int status; - char *attrs[8] = { "monitorCounter", + char *attrs[9] = { "monitorCounter", "monitorOpCompleted", "monitorOpInitiated", "monitoredInfo", "olmBDBEntryCache", "olmBDBDNCache", "olmBDBIDLCache", - "namingContexts" }; + "namingContexts", + NULL }; if ((ud == NULL) || (ud->data == NULL)) {