From: Howard Chu Date: Tue, 3 Apr 2007 01:40:52 +0000 (+0000) Subject: ITS#4875 ignore zero-length st_size X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~563 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b596ae0adf696b37d92b5321c02ad6a8d25e35ad;p=openldap ITS#4875 ignore zero-length st_size --- diff --git a/libraries/liblutil/passfile.c b/libraries/liblutil/passfile.c index c84cda7367..c6d9ff4163 100644 --- a/libraries/liblutil/passfile.c +++ b/libraries/liblutil/passfile.c @@ -44,7 +44,7 @@ lutil_get_filed_password( } passwd->bv_val = NULL; - passwd->bv_len = 4196; + passwd->bv_len = 4096; #ifdef HAVE_FSTAT { @@ -56,7 +56,8 @@ lutil_get_filed_password( filename ); } - passwd->bv_len = sb.st_size; + if ( sb.st_size ) + passwd->bv_len = sb.st_size; } } #endif /* HAVE_FSTAT */