From 97683ac5fd22927a5470d7f1b0836f20249f9c0b Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 2 Aug 1999 20:03:50 +0000 Subject: [PATCH] ldap_perror: don't print matched DN or error text if length is zero. --- libraries/libldap/error.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/libldap/error.c b/libraries/libldap/error.c index 0c58e18507..5780012bc7 100644 --- a/libraries/libldap/error.c +++ b/libraries/libldap/error.c @@ -145,12 +145,12 @@ ldap_perror( LDAP *ld, LDAP_CONST char *str ) s, ld->ld_errno ); } - if ( ld->ld_matched != NULL ) { + if ( ld->ld_matched != NULL && ld->ld_matched[0] != '\0' ) { fprintf( stderr, "\tmatched: \"%s\"\n", ld->ld_matched ); } - if ( ld->ld_error != NULL ) { + if ( ld->ld_error != NULL && ld->ld_error[0] != '\0' ) { fprintf( stderr, "\tadditional info: %s\n", ld->ld_error ); } -- 2.39.5