Morning Hege,

This change worries me.  What does the comment "let per figure it out from the BOM" mean and does the change on the return undef change that?

Worried that Perl Critic is complaining about something that was done on purpose.

Do we have a good test case for this change?  if not can we synthesize a spample and add a test for it?

Regards,
KAM

On 5/1/2022 5:25 AM, h...@apache.org wrote:
Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Message/Node.pm
URL:http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Message/Node.pm?rev=1900446&r1=1900445&r2=1900446&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Message/Node.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Message/Node.pm Sun May  1 
09:25:11 2022
@@ -389,7 +389,7 @@ sub detect_utf16 {
        # avoid scan if BOM present
        if( $data =~ /^(?:\xff\xfe|\xfe\xff)/ ) {
                dbg( "message: detect_utf16: found BOM" );
-               return undef;   # let perl figure it out from the BOM
+               return; # let perl figure it out from the BOM
        }
        

--
Kevin A. McGrail
kmcgr...@apache.org

Member, Apache Software Foundation
Chair Emeritus Apache SpamAssassin Project
https://www.linkedin.com/in/kmcgrail - 703.798.0171

Reply via email to