mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-09 02:52:04 +08:00
Add protect against new connection descriptor being to large for
our connection table.
This commit is contained in:
parent
fdc44bf313
commit
aa38035780
@ -233,6 +233,16 @@ slapd_daemon(
|
||||
ldap_pvt_thread_mutex_unlock( &new_conn_mutex );
|
||||
continue;
|
||||
}
|
||||
|
||||
/* make sure descriptor number isn't too great */
|
||||
if ( ns >= dtblsize ) {
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"new connection on %d beyond descriptor table size %d\n",
|
||||
ns, dtblsize, 0 );
|
||||
close(ns);
|
||||
ldap_pvt_thread_mutex_unlock( &new_conn_mutex );
|
||||
continue;
|
||||
}
|
||||
|
||||
lber_pvt_sb_set_desc( &c[ns].c_sb, ns );
|
||||
lber_pvt_sb_set_io( &c[ns].c_sb, &lber_pvt_sb_io_tcp, NULL );
|
||||
|
Loading…
Reference in New Issue
Block a user