From: Eric Wong Date: Sat, 18 Jan 2025 01:26:15 +0000 (+0000) Subject: mda: use read_all for error handling X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aa96be8ce868f2db1f9abd67e985f750edeb023e;p=thirdparty%2Fpublic-inbox.git 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. --- 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;