https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7230

--- Comment #3 from Mark Martinec <[email protected]> ---
> > -    if (defined fileno $message) {
> > +    if (!$message->UNIVERSAL::can("fileno") || defined fileno $message) {
> 
> AFAIK will make SA read empty message without OBVIOUS explanation.
> IMHO it will make things worse without "else" part for "fileno if".

If the IO:: module does not implement the fileno method (like
the IO::Lines, where a file handle is not associated with any
file descriptor), it makes no sense to test for a presence of
a file descriptor. If reading fails for some reason in sysread,
it will be detected and reported when it happens.

If the IO:: module _does_ implement the fileno method, then the
diff above makes no change the current behaviour. (I don't know
why a test for a fileno was there in the first place, I'm just
leaving a status quo. To which you are probably referring, but
that would be an unrelated issue).

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to