You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by mm...@apache.org on 2014/09/04 11:29:55 UTC

svn commit: r1622432 - /spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/AskDNS.pm

Author: mmartinec
Date: Thu Sep  4 09:29:55 2014
New Revision: 1622432

URL: http://svn.apache.org/r1622432
Log:
MS::Plugin::AskDNS - avoid warning on undef in eq when a DNS response has no answer section

Modified:
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/AskDNS.pm

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/AskDNS.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/AskDNS.pm?rev=1622432&r1=1622431&r2=1622432&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/AskDNS.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/AskDNS.pm Thu Sep  4 09:29:55 2014
@@ -589,7 +589,8 @@ sub process_response_packet {
           $match = 1  if $subtest->{$rcode};
         } elsif ($rcode != 0) {
           # skip remaining tests on DNS error
-        } elsif (!grep($_ eq 'ANY' || $_ eq $rr_type, @$answer_types_ref) ) {
+        } elsif (!defined($rr_type) ||
+                 !grep($_ eq 'ANY' || $_ eq $rr_type, @$answer_types_ref) ) {
           # skip remaining tests on wrong RR type
         } elsif (!defined $subtest) {
           $match = 1;  # any valid response of the requested RR type matches