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/07/26 14:28:45 UTC

[Bug 6468] New: splice() offset past end of array in HTML.pm

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

           Summary: splice() offset past end of array in HTML.pm
           Product: Spamassassin
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Libraries
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: 63832452@gmx.net


Hi,

Sometimes when I run sa-update I get the warning above. E.g.:

# sa-learn --spam /var/mail/public/.SpamDrop/{new,cur}>/dev/null
splice() offset past end of array at /usr/share/perl5/Mail/SpamAssassin/HTML.pm
line 495.

This is annoying because the command above is run with cron daemon.

I guess the warning happens with syntactically incorrect mails. But I think
this is often the case with spam mails ;-)

I propose to exchange the following lines (I will also add a patch):

      splice @rgb, 3;
      for(my $i=0; $i<3; $i++) {

But I am not sure if this really solves the problem so please check ;-)

-- 
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 6468] [review] splice() offset past end of array in HTML.pm

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #8 from Mark Martinec <Ma...@ijs.si> 2011-05-09 00:34:21 UTC ---
3.3:
  Bug 6468: splice() offset past end of array in HTML.pm
  Sending lib/Mail/SpamAssassin/HTML.pm
Committed revision 1100849.

-- 
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 6468] splice() offset past end of array in HTML.pm

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

--- Comment #1 from 63832452@gmx.net 2010-07-26 08:29:32 EDT ---
Created an attachment (id=4789)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4789)
Proposed patch

-- 
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 6468] splice() offset past end of array in HTML.pm

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

63832452@gmx.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |63832452@gmx.net
            Version|unspecified                 |3.2.5

-- 
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 6468] splice() offset past end of array in HTML.pm

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

63832452@gmx.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #4789|0                           |1
        is obsolete|                            |

--- Comment #2 from 63832452@gmx.net 2010-07-26 08:34:37 EDT ---
Created an attachment (id=4790)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4790)
Proposed patch

-- 
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 6468] [review] splice() offset past end of array in HTML.pm

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

Kevin A. McGrail <km...@pccc.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kmcgrail@pccc.com
  Status Whiteboard|needs 2 more votes for      |needs 1 more votes for
                   |3.3.2                       |3.3.2

--- Comment #5 from Kevin A. McGrail <km...@pccc.com> 2010-07-26 15:45:34 EDT ---
(In reply to comment #4)
> Created an attachment (id=4791)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4791) [details]
> proposed patch
> 
> Attached is my proposed patch. Note that the '$_ = 0;' in the original
> code is probably also a bug: it sets an element of array @parts to
> zero, which is then never used - it probably was supposed to set
> $rgb[$i] to zero instead.
> 
> trunk:
>   Bug 6468: splice() offset past end of array in HTML.pm
> Sending  lib/Mail/SpamAssassin/HTML.pm
> Committed revision 979412.

+1 KAM

-- 
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 6468] splice() offset past end of array in HTML.pm

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

--- Comment #3 from 63832452@gmx.net 2010-07-26 08:35:54 EDT ---
(In reply to comment #0)
> [...]
>       splice @rgb, 3;
>       for(my $i=0; $i<3; $i++) {

Sorry, wrong: Put the splice *after* the for-loop (see second patch).

-- 
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 6468] [review] splice() offset past end of array in HTML.pm

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|Undefined                   |3.3.2
            Summary|splice() offset past end of |[review] splice() offset
                   |array in HTML.pm            |past end of array in
                   |                            |HTML.pm
  Status Whiteboard|                            |needs 2 more votes for
                   |                            |3.3.2

-- 
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 6468] [review] splice() offset past end of array in HTML.pm

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |niamh@holtain.net

--- Comment #6 from Mark Martinec <Ma...@ijs.si> 2011-03-11 06:52:12 EST ---
*** Bug 6551 has been marked as a duplicate of this bug. ***

-- 
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 6468] splice() offset past end of array in HTML.pm

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #4790|0                           |1
        is obsolete|                            |

--- Comment #4 from Mark Martinec <Ma...@ijs.si> 2010-07-26 15:13:32 EDT ---
Created an attachment (id=4791)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4791)
proposed patch

Attached is my proposed patch. Note that the '$_ = 0;' in the original
code is probably also a bug: it sets an element of array @parts to
zero, which is then never used - it probably was supposed to set
$rgb[$i] to zero instead.

trunk:
  Bug 6468: splice() offset past end of array in HTML.pm
Sending  lib/Mail/SpamAssassin/HTML.pm
Committed revision 979412.

-- 
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 6468] [review] splice() offset past end of array in HTML.pm

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

Henrik Krohns <he...@hege.li> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hege@hege.li
  Status Whiteboard|needs 1 more votes for      |ready to commit for 3.3.2
                   |3.3.2                       |

--- Comment #7 from Henrik Krohns <he...@hege.li> 2011-05-08 18:48:50 UTC ---
+1 for Mark

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