From c640e2c73d62842239477679e80179a2df7698cf Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Tue, 19 Aug 2014 13:54:53 +0200 Subject: [PATCH] openldap: terminate attrs array with NULL ... as mentioned in ldap_search_ext_s(3). This fixes a segfault when building with -O2. --- src/openldap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)) { -- 2.30.2