ldap/servers/snmp/main.c | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 58dc93c0a63b60abd13926b3d6dbfbc8e049e023
Author: Mark Reynolds <mareynol(a)redhat.com>
Date: Fri Mar 23 11:44:00 2012 -0400
Ticket #319 - ldap-agent crashes on start with signal SIGSEGV
Bug Description: If you have two or more slapd instances defined in
ldap-agent.conf file, the agent will crash at startup.
Fix Description: When using openldap, we were not reseting the buffer
length between dse.ldif files. So we end passing in a
huge buffer length for the first line of the new file,
which leads to invalid memory being read later on.
https://fedorahosted.org/389/ticket/319
diff --git a/ldap/servers/snmp/main.c b/ldap/servers/snmp/main.c
index a255880..53af972 100644
--- a/ldap/servers/snmp/main.c
+++ b/ldap/servers/snmp/main.c
@@ -382,6 +382,7 @@ load_config(char *conf_path)
/* Open dse.ldif */
#if defined(USE_OPENLDAP)
dse_fp = ldif_open(serv_p->dse_ldif, "r");
+ buflen = 0;
#else
dse_fp = fopen(serv_p->dse_ldif, "r");
#endif