From aa96be8ce868f2db1f9abd67e985f750edeb023e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 18 Jan 2025 01:26:15 +0000 Subject: [PATCH] mda: use read_all for error handling We already imported PublicInbox::IO for this script and read_all provides more safety in case default PerlIO semantics change for read-in-full behavior. --- script/public-inbox-mda | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/script/public-inbox-mda b/script/public-inbox-mda index 9d68ea35d..bc1dc286f 100755 --- a/script/public-inbox-mda +++ b/script/public-inbox-mda @@ -100,8 +100,7 @@ if ($spamc) { } else { # no spam checking configured: $spam_ok = 1; $emm = $ems; - my $fh = $emm->fh; - read($fh, $str, -s $fh); + PublicInbox::IO::read_all $emm->fh, undef, \$str; } $do_exit->(0) unless $spam_ok; -- 2.47.3