From: Kurt Zeilenga Date: Mon, 24 May 1999 20:08:32 +0000 (+0000) Subject: ITS#159 fix. ldaphost may be NULL when used as printf "%s" argument. X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~11 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fffc29df9becf3ccdb7245150d7e222f0c227c43;p=openldap ITS#159 fix. ldaphost may be NULL when used as printf "%s" argument. --- diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index 83b1720e76..7a8a84e6a8 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -265,7 +265,9 @@ main( int argc, char **argv ) #endif if ( verbose ) { - printf( "ldap_init( %s, %d )\n", ldaphost, ldapport ); + printf( "ldap_init( %s, %d )\n", + (ldaphost != NULL) ? ldaphost : "", + ldapport ); } if (( ld = ldap_init( ldaphost, ldapport )) == NULL ) {