Issue 984 - Assertion failing in getentry.c
Summary: Assertion failing in getentry.c
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-01-23 21:40 UTC by pat@sitepak.com
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 pat@sitepak.com 2001-01-23 21:40:08 UTC
Full_Name: Pat Deegan
Version: 2.0.7
OS: Linux 2.2.9-19
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (206.47.244.89)


I set up ProFTPd 1.2.0rc2 to use LDAP and created a test posixAccount.  Using
ncftp to attempt and log in kept producing errors:

ProFTPD 1.2.0 Server (9-1-1 SuperFly ProFTPD Installation) [nine-one-one]
Invalid reply: "proftpd: connected: nine-one-one (127.0.0.1:1943):
getentry.c:30
: ldap_first_entry: Assertion `chain != ((void *)0)' failed."

The relevant code in getentry.c:

ldap_first_entry( LDAP *ld, LDAPMessage *chain )
{
    assert( ld != NULL );
    assert( LDAP_VALID( ld ) );
===>assert( chain != NULL ); <===

The odd thing is that, following the assertions, there's the test :

    if( ld == NULL || chain == NULL ) {
        return NULL;
    }

Commenting out the 
	assert( chain != NULL ); 
and rebuilding solved all my troubles, so far...


Comment 1 Kurt Zeilenga 2001-01-23 22:09:53 UTC
It is not valid to call ldap_first_entry with either
argument NULL.  The behavior of such a call is undefined.

When debugging is enabled, we crash so that the programmer
can correct the bug in the calling routine.

Kurt

At 09:40 PM 1/23/01 +0000, pat@sitepak.com wrote:
>Full_Name: Pat Deegan
>Version: 2.0.7
>OS: Linux 2.2.9-19
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (206.47.244.89)
>
>
>I set up ProFTPd 1.2.0rc2 to use LDAP and created a test posixAccount.  Using
>ncftp to attempt and log in kept producing errors:
>
>ProFTPD 1.2.0 Server (9-1-1 SuperFly ProFTPD Installation) [nine-one-one]
>Invalid reply: "proftpd: connected: nine-one-one (127.0.0.1:1943):
>getentry.c:30
>: ldap_first_entry: Assertion `chain != ((void *)0)' failed."
>
>The relevant code in getentry.c:
>
>ldap_first_entry( LDAP *ld, LDAPMessage *chain )
>{
>    assert( ld != NULL );
>    assert( LDAP_VALID( ld ) );
>===>assert( chain != NULL ); <===
>
>The odd thing is that, following the assertions, there's the test :
>
>    if( ld == NULL || chain == NULL ) {
>        return NULL;
>    }
>
>Commenting out the 
>        assert( chain != NULL ); 
>and rebuilding solved all my troubles, so far...

Comment 2 Kurt Zeilenga 2001-01-24 21:12:28 UTC
changed notes
changed state Open to Closed
Comment 3 OpenLDAP project 2014-08-01 21:06:13 UTC
as intended