Issue 1415 - core dump when freeing unallocated sockets
Summary: core dump when freeing unallocated sockets
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-29 13:43 UTC by peter@adpm.de
Modified: 2014-08-01 21:06 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description peter@adpm.de 2001-10-29 13:43:25 UTC
Full_Name: Peter Marschall
Version: 2.0.18
OS: Linux 2.4.x
URL: 
Submission from: (NULL) (194.145.150.12)


In slap_free_listener_addresses() in file servers/slapd/daemons.c), 
slapd tries to any free listener addresses that are != NULL.

There may be cases, when this is not 100% guaranteed.

The following patch for slap_get_listener_addresses() in file
ervers/slapd/daemons.c (to be applied with patch -l)
should make it absolutely sure:

--- servers/slapd/daemon.c
+++ servers/slapd/daemon.c      Fri Oct 19 12:16:32 2001
@@ -265,7 +265,7 @@
                for (n=2; (sai = sai->ai_next) != NULL; n++) {
                        /* EMPTY */ ;
                }
-               *sal = ch_malloc(n * sizeof(void *));
+               *sal = ch_calloc(n, sizeof(void *));
                if (*sal == NULL) {
                        return -1;
                }


Comment 1 Kurt Zeilenga 2001-11-03 12:10:30 UTC
moved from Incoming to Software Bugs
Comment 2 Kurt Zeilenga 2001-11-03 13:05:21 UTC
changed notes
changed state Open to Release
Comment 3 Kurt Zeilenga 2001-11-03 13:05:31 UTC
changed state Release to Test
Comment 4 Kurt Zeilenga 2001-12-07 16:26:00 UTC
changed notes
changed state Test to Release
Comment 5 Kurt Zeilenga 2001-12-20 17:57:22 UTC
changed notes
changed state Release to Closed
Comment 6 Howard Chu 2003-12-12 22:59:02 UTC
moved from Software Bugs to Archive.Software Bugs
Comment 7 OpenLDAP project 2014-08-01 21:06:21 UTC
fixed in HEAD
fixed in re20