logwatch bug in postfix filter

Bug #809753 reported by Brezhonneg
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
logwatch (Ubuntu)
Fix Released
Medium
Dave Walker

Bug Description

I am using logwatch 7.3.6.cvs20090906-1ubuntu4 on oneiric with postfix 2.8.3-1.

Logwatch is reporting quite a few errors while parsing postfix log entries. Here is a complete list from my latest logwatch report:

--------------------- Postfix Begin ------------------------

 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 3.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 10.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 25.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 31.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 37.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 43.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 49.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 72.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 112.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 118.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 134.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 147.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 153.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 159.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 189.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 195.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 201.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 214.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 220.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 226.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 233.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 240.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 247.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 257.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 279.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 285.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 291.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 297.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 303.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 309.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 317.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 326.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 331.
 Use of uninitialized value $_[0] in reverse at /usr/share/logwatch/scripts/services/postfix line 254, <> line 336.
 ****** Summary *************************************************************************************

[rest of the logwatch log here]

Line 254 of /usr/share/logwatch/scripts/services/postfix is located in a sub called commify:
 251 # Inserts commas in numbers for easier readability
 252 #
 253 sub commify ($) {
 254 my $text = reverse $_[0];
 255 $text =~ s/(\d\d\d)(?=\d)(?!\d*\.)/$1,/g;
 256 return scalar reverse $text;
 257 }

I know nothing about perl so I do not have the slightest idea of what is wrong and how to fix...

Related branches

Dave Walker (davewalker)
Changed in logwatch (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Mike Cappella (akf-7tkv-nw2) wrote :

This is already resolved upstream:

http://logreporters.sourceforge.net/

2010-11-12 (version: 1.39.05)
 - Fix: Check input value to commify() against undef; required for perl 5.12.

Dave Walker (davewalker)
Changed in logwatch (Ubuntu):
status: New → Triaged
assignee: nobody → Dave Walker (davewalker)
milestone: none → oneiric-alpha-3
tags: added: server-o-rs
Dave Walker (davewalker)
Changed in logwatch (Ubuntu):
milestone: oneiric-alpha-3 → ubuntu-11.10-beta-1
Revision history for this message
Ante Karamatić (ivoks) wrote :

Proposed patch. I didn't want to change package version, so I just added quilt as a build-dep, including all other required stuff.

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package logwatch - 7.3.6.cvs20090906-1ubuntu5

---------------
logwatch (7.3.6.cvs20090906-1ubuntu5) oneiric; urgency=low

  * debian/patches/lp-809753-commify:
    - return undef is not defined, instead of error (LP: #809753)
  * debian/control:
    - build depend on quilt
  * debian/rules:
    - add dh_quilt_patch and dh_quilt_unpatch
 -- Ante Karamatic <email address hidden> Wed, 17 Aug 2011 19:28:17 +0200

Changed in logwatch (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.