mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-05 13:40:08 +08:00
fix from jon@symas.com - inet_ntoa on uninitialized sockaddr
This commit is contained in:
parent
3545f082af
commit
8ad557e4ec
@ -733,11 +733,10 @@ static Listener * slap_open_listener(
|
||||
inet_ntop( AF_INET, &((struct sockaddr_in *)*sal)->sin_addr,
|
||||
addr, sizeof(addr) );
|
||||
s = addr;
|
||||
port = ((struct sockaddr_in *)*sal) ->sin_port;
|
||||
#else
|
||||
s = inet_ntoa( l.sl_addr.sin_addr );
|
||||
port = l.sl_addr.sin_port;
|
||||
s = inet_ntoa( ((struct sockaddr_in *) *sal)->sin_addr );
|
||||
#endif
|
||||
port = ((struct sockaddr_in *)*sal) ->sin_port;
|
||||
l.sl_name = ch_malloc( sizeof("IP=255.255.255.255:65535") );
|
||||
sprintf( l.sl_name, "IP=%s:%d",
|
||||
s != NULL ? s : "unknown" , port );
|
||||
|
Loading…
Reference in New Issue
Block a user