Bug 5094 - [review] Use of uninitialized value in pattern match (m//) at AntiVirus.pm line 105
Summary: [review] Use of uninitialized value in pattern match (m//) at AntiVirus.pm li...
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Plugins (show other bugs)
Version: 3.1.5
Hardware: Other other
: P5 normal
Target Milestone: 3.1.6
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard: ready to commit
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-08 03:05 UTC by Daryl C. W. O'Shea
Modified: 2006-10-03 16:02 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status
trigger email text/plain None Daryl C. W. O'Shea [HasCLA]
suggested patch patch None Daryl C. W. O'Shea [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Daryl C. W. O'Shea 2006-09-08 03:05:49 UTC
I've been seeing a few of these lately.  It's not immediately obvious to me why.

Sep  4 12:02:23 wally spamd[18882]: Use of uninitialized value in pattern match
(m//) at /usr/lib/perl5/site_perl/5.8.6/Mail/S
pamAssassin/Plugin/AntiVirus.pm line 105, <GEN1371> line 198.

[dos@wally ~]$ spamassassin -V
SpamAssassin version 3.1.5
  running on Perl version 5.8.6
Comment 1 Daryl C. W. O'Shea 2006-09-08 03:07:18 UTC
Created attachment 3689 [details]
trigger email
Comment 2 Daryl C. W. O'Shea 2006-09-28 19:37:01 UTC
Hrm...  $p->raw()->[0] is undefined at line 111.  I currently know nothing about
how find_parts works, so I have no idea if that should be expected or not.
Comment 3 Daryl C. W. O'Shea 2006-09-29 11:34:53 UTC
Created attachment 3708 [details]
suggested patch
Comment 4 Daryl C. W. O'Shea 2006-09-29 11:35:41 UTC
[dos@FC5-VPC trunk]$ svn ci -m "bug 5094: check for unit'd value used in
AntiVirus.pm"
Sending        lib/Mail/SpamAssassin/Plugin/AntiVirus.pm
Transmitting file data .
Committed revision 451380.
Comment 5 Justin Mason 2006-10-03 11:30:59 UTC
+1 -- makes sense to be defensive there
Comment 6 Sidney Markowitz 2006-10-03 15:29:41 UTC
+1
Comment 7 Daryl C. W. O'Shea 2006-10-03 16:00:27 UTC
[dos@FC5-VPC 3.1]$ svn ci -m "bug 5094: check for unit'd value used in AntiVirus.pm"
Sending        lib/Mail/SpamAssassin/Plugin/AntiVirus.pm
Transmitting file data .
Committed revision 452671.
Comment 8 Daryl C. W. O'Shea 2006-10-03 16:02:06 UTC
fixed