Bug 1083 - Use of uninitialized variable in SpamAssassin.pm
Summary: Use of uninitialized variable in SpamAssassin.pm
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 2.42
Hardware: PC Linux
: P2 minor
Target Milestone: ---
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-08 11:58 UTC by Dianne Skoll
Modified: 2002-10-09 20:38 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Dianne Skoll 2002-10-08 11:58:44 UTC
A stock install of SpamAssassin in conjunction with MIMEDefang produces this error:

Use of uninitialized value in concatenation (.) at
/usr/lib/perl5/site_perl/5.6.0/Mail/SpamAssassin.pm line 919.

The trivial patch below fixes it:

--- SpamAssassin.pm.ORIG        Tue Oct  8 14:53:15 2002
+++ SpamAssassin.pm     Tue Oct  8 14:57:13 2002
@@ -916,7 +916,7 @@
   return undef if (!defined $path);
   $path =~ s/__local_rules_dir__/$self->{LOCAL_RULES_DIR} || ''/ges;
   $path =~ s/__def_rules_dir__/$self->{DEF_RULES_DIR} || ''/ges;
-  $path =~ s/__prefix__/$self->{PREFIX} || $Config{prefix}/gs;
+  $path =~ s/__prefix__/$self->{PREFIX} || $Config{prefix} || ''/ges;
   $path =~ s/^\~([^\/]*)/$self->expand_name($1)/es;
   $path;
 }
Comment 1 Dianne Skoll 2002-10-08 12:00:15 UTC
Hmmm... actually, although my patch "fixes" the problem, it really masks the
symptom.  We need to find out WHY $self->{PREFIX} and $Config{prefix} are not
defined.
Comment 2 Theo Van Dinter 2002-10-08 12:04:36 UTC
Subject: Re: [SAdev]  New: Use of uninitialized variable in SpamAssassin.pm

On Tue, Oct 08, 2002 at 11:58:44AM -0700, bugzilla-daemon@hughes-family.org wrote:
> Use of uninitialized value in concatenation (.) at
> /usr/lib/perl5/site_perl/5.6.0/Mail/SpamAssassin.pm line 919.
> 
> The trivial patch below fixes it:

Ok, applied to HEAD and b2_4_0
Comment 3 Justin Mason 2002-10-10 04:38:16 UTC
fixed