--- spamd/spamd.raw (revision 1884377) +++ spamd/spamd.raw (working copy) @@ -1832,6 +1832,7 @@ return -1; } last if $numbytes == 0; + last if $red >= $expected_length; $red += $numbytes; }