Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#2 off-by-one array size error

closed
nobody
None
5
2012-03-29
2010-06-03
Frank Löffler
No

The loop in the patch should abort if the array @popular has less elements than $self->{cfg}->{wordhistory}. However, it already aborts one word before that. With large logs this goes unnoticed because @popular is probably quite long then. I noticed because it only contained one word but the HTML output didn't show it.

Discussion

  • Frank Löffler
    Frank Löffler
    2010-06-03

    Don't abort with the second-to-last word in the array, but with the last.

     
    Attachments
  • HM2K
    HM2K
    2012-01-19

    Applied.