You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Simon Loewenthal <si...@klunky.co.uk> on 2013/02/27 16:29:06 UTC

sa-learn " splice() offset past end of array at /usr/share/perl5/Mail/SpamAssassin/HTML.pm line 492 and 502.

 

Hi, 

 Just notcied sa-learn kick up a fuss with some files fed into
it from a user's HAM directory in a dovecot directory. 

I put a copy of
the ham on http://pastebin.com/MLEhYsG7

splice() offset past end of
array at /usr/share/perl5/Mail/SpamAssassin/HTML.pm line 492.
Use of
uninitialized value within @rgb in sprintf at
/usr/share/perl5/Mail/SpamAssassin/HTML.pm line 502.
Use of
uninitialized value within @rgb in sprintf at
/usr/share/perl5/Mail/SpamAssassin/HTML.pm line 502.
Use of
uninitialized value within @rgb in sprintf at
/usr/share/perl5/Mail/SpamAssassin/HTML.pm line 502.
splice() offset
past end of array at /usr/share/perl5/Mail/SpamAssassin/HTML.pm line
492.
Use of uninitialized value within @rgb in sprintf at
/usr/share/perl5/Mail/SpamAssassin/HTML.pm line 502.
Use of
uninitialized value within @rgb in sprintf at
/usr/share/perl5/Mail/SpamAssassin/HTML.pm line 502.
Use of
uninitialized value within @rgb in sprintf at
/usr/share/perl5/Mail/SpamAssassin/HTML.pm line 502.
splice() offset
past end of array at /usr/share/perl5/Mail/SpamAssassin/HTML.pm line
492.
Use of uninitialized value within @rgb in sprintf at
/usr/share/perl5/Mail/SpamAssassin/HTML.pm line 502.
Use of
uninitialized value within @rgb in sprintf at
/usr/share/perl5/Mail/SpamAssassin/HTML.pm line 502.
Use of
uninitialized value within @rgb in sprintf at
/usr/share/perl5/Mail/SpamAssassin/HTML.pm line 502.
splice() offset
past end of array at /usr/share/perl5/Mail/SpamAssassin/HTML.pm line
492.
Use of uninitialized value within @rgb in sprintf at
/usr/share/perl5/Mail/SpamAssassin/HTML.pm line 502.
Use of
uninitialized value within @rgb in sprintf at
/usr/share/perl5/Mail/SpamAssassin/HTML.pm line 502.
Use of
uninitialized value within @rgb in sprintf at
/usr/share/perl5/Mail/SpamAssassin/HTML.pm line 502.
splice() offset
past end of array at /usr/share/perl5/Mail/SpamAssassin/HTML.pm line
492.
Use of uninitialized value within @rgb in sprintf at
/usr/share/perl5/Mail/SpamAssassin/HTML.pm line 502.
Use of
uninitialized value within @rgb in sprintf at
/usr/share/perl5/Mail/SpamAssassin/HTML.pm line 502.
Use of
uninitialized value within @rgb in sprintf at
/usr/share/perl5/Mail/SpamAssassin/HTML.pm line 502.
Learned tokens from
0 message(s) (1 message(s) examined)

Note that due to the content, the
email has had to be heavily redacted. All content has been replaced with
the words "contend removed" or similar, but all formatting (including
smilies and punctuation) has been unaltered. The IP addresses and
message IDs have had to be changed into something that has obviously
been changed 

/usr/share/perl5/Mail/SpamAssassin/HTML.pm 

line 492 and
502 

 elsif ($name eq 'style') {
 $new{style} = $attr->{style};
 my
@parts = split(/;/, $new{style});
 foreach (@parts) {
 if
(/^s*(background-)?color:s*(.+)s*$/i) {
 my $whcolor = $1 ? 'bgcolor' :
'fgcolor';
 my $value = lc $2;

 if ($value =~ /rgb/) {
 $value =~
tr/0-9,//cd;
 my @rgb = split(/,/, $value);
 SPLICE @RGB, 3;
 for(my
$i=0; $i<3; $i++) {
 if (!defined $rgb[$i]) {
 $_ = 0;
 }
 elsif
($rgb[$i] > 255) {
 $rgb[$i] = 255;
 }
 }

        $NEW{$WHCOLOR} =
SPRINTF("#%02X%02X%02X", @RGB);
 }
 else {
 $new{$whcolor} =
name_to_rgb($value);
 }
 }
 elsif (/^s*([a-z_-]+)s*:s*(S.*?)s*$/i) {
 #
"display: none", "visibility: hidden", etc.
 $new{'style_'.$1} = $2;
 }

}
 }

sa-learn still exits with a zero. 

Does any one know what may
have tripped this up? Is it a bug, or some strange formatting in the
email message? 

Not a big deal for me, but perhaps interesting for
someone else. (/shrug) :D 

Cheers, Simon. 

-- 
"I decided that I was a
lemon for a couple of weeks. I kept myself amused all that time jumping
in and out of a gin and tonic."
simon@klunky .co.uk / .org
 

Re: sa-learn " splice() offset past end of array at /usr/share/perl5/Mail/SpamAssassin/HTML.pm line 492 and 502.

Posted by Simon Loewenthal <si...@klunky.co.uk>.

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

>Simon Loewenthal wrote:
>> > Just notcied sa-learn kick up a fuss with some files fed into
>> > it from a user's HAM directory in a dovecot directory.
>> > 
>> > I put a copy of
>> > the ham on http://pastebin.com/MLEhYsG7
>> 
>> Could you go to the SpamAssassin bugzilla and open a bug for this,
>and
>> attach the sample?
>
>Looks like a Bug 6468, fixed with 3.3.2 I believe:
>
>  https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6468
>  Bug 6468 - splice() offset past end of array in HTML.pm
>
>
>Mark


I have better upgrade

Re: sa-learn " splice() offset past end of array at /usr/share/perl5/Mail/SpamAssassin/HTML.pm line 492 and 502.

Posted by Mark Martinec <Ma...@ijs.si>.
Simon Loewenthal wrote:
> > Just notcied sa-learn kick up a fuss with some files fed into
> > it from a user's HAM directory in a dovecot directory.
> > 
> > I put a copy of
> > the ham on http://pastebin.com/MLEhYsG7
> 
> Could you go to the SpamAssassin bugzilla and open a bug for this, and
> attach the sample?

Looks like a Bug 6468, fixed with 3.3.2 I believe:

  https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6468
  Bug 6468 - splice() offset past end of array in HTML.pm


Mark

Re: sa-learn " splice() offset past end of array at /usr/share/perl5/Mail/SpamAssassin/HTML.pm line 492 and 502.

Posted by John Hardin <jh...@impsec.org>.
On Wed, 27 Feb 2013, Simon Loewenthal wrote:

>
>
> Hi,
>
> Just notcied sa-learn kick up a fuss with some files fed into
> it from a user's HAM directory in a dovecot directory.
>
> I put a copy of
> the ham on http://pastebin.com/MLEhYsG7

Could you go to the SpamAssassin bugzilla and open a bug for this, and 
attach the sample?

Thanks!

-- 
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  jhardin@impsec.org    FALaholic #11174     pgpk -a jhardin@impsec.org
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
   Gun Control laws cannot reduce violent crime, because gun control
   laws assume a violent criminal will obey the law.
-----------------------------------------------------------------------
  14 days until Albert Einstein's 134th Birthday