From fffc29df9becf3ccdb7245150d7e222f0c227c43 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 24 May 1999 20:08:32 +0000 Subject: [PATCH] ITS#159 fix. ldaphost may be NULL when used as printf "%s" argument. --- clients/tools/ldapsearch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 ) { -- 2.39.5