From b596ae0adf696b37d92b5321c02ad6a8d25e35ad Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 3 Apr 2007 01:40:52 +0000 Subject: [PATCH] ITS#4875 ignore zero-length st_size --- libraries/liblutil/passfile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 */ -- 2.39.5