You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@issues.apache.org on 2010/04/29 11:57:40 UTC

[Bug 6426] New: "Use of uninitialized value in pattern match" warnings

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6426

           Summary: "Use of uninitialized value in pattern match" warnings
           Product: Spamassassin
           Version: 3.3.1
          Platform: PC
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: spamassassin
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: bas@debian.org


I gt a lot of these error messages in my mail.log:

Apr 29 11:24:12 aegir spamd[1103]: Use of uninitialized value in pattern match
(m//) at
/usr/local/lib/perl5/site_perl/5.8.9/Mail/SpamAssassin/Plugin/URIDNSBL.pm line
925, <GEN7455> line 124. 

Line 925 is the following:
    next if ($tflags->{$rulename} =~ /\b(?:ips_only|domains_only)\b/);

so it seems $tflags->{$rulename} does not exist.
Debugging show that the rule triggering the error is a user-created rule, which
indeed does not declare any tflags.

I propose to change the code to:

    next if (exists $tflags->{$rulename} and $tflags->{$rulename} =~
/\b(?:ips_only|domains_only)\b/);

to fix the problem.  Alternatively, you could add a warning when reading the
user prefs, telling the user to add a tflags line to his rule.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6426] [review] "Use of uninitialized value in pattern match" warnings

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6426

Darxus <Da...@ChaosReigns.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Darxus@ChaosReigns.com

--- Comment #2 from Darxus <Da...@ChaosReigns.com> 2011-05-23 19:41:58 UTC ---
Close.

Already committed to target.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6426] [review] "Use of uninitialized value in pattern match" warnings

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6426

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
  Status Whiteboard|needs 2 votes               |

--- Comment #3 from Mark Martinec <Ma...@ijs.si> 2011-05-23 23:08:59 UTC ---
Closing.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6426] [review] "Use of uninitialized value in pattern match" warnings

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6426

Mark Martinec <Ma...@ijs.si> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|Undefined                   |3.4.0
            Summary|"Use of uninitialized value |[review] "Use of
                   |in pattern match" warnings  |uninitialized value in
                   |                            |pattern match" warnings
  Status Whiteboard|                            |needs 2 votes

--- Comment #1 from Mark Martinec <Ma...@ijs.si> 2011-05-19 14:03:51 UTC ---
Sure, can't hurt, +1

trunk:
  Bug 6426: "Use of uninitialized value in pattern match" warnings'
  Sending lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm
Committed revision 1124798.

-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.