[INN] #41: innreport creates incorrect file names at the start of the year

INN rra at stanford.edu
Sun Jan 11 18:08:01 UTC 2009


#41: innreport creates incorrect file names at the start of the year
-----------------------+----------------------------------------------------
 Reporter:  eagle      |        Owner:  eagle
     Type:  defect     |       Status:  new  
 Priority:  medium     |    Milestone:  2.6.0
Component:  utilities  |      Version:       
 Severity:  normal     |   Resolution:       
 Keywords:             |  
-----------------------+----------------------------------------------------
Changes (by iulius):

  * version:  2.4.5 =>
  * milestone:  => 2.6.0


Comment:

 Test case:
 {{{
 Dec 31 19:27:55 news innd: ME status seconds 147396 accepted 3217 refused
 11238 rejected 12 duplicate 0 accepted size 3885778 duplicate size 0
 rejected size 21506
 Jan  9 19:27:58 news innd: news.matabio.net status seconds 23306 accepted
 1 refused 1350 rejected 0 duplicate 0 accepted size 2018 duplicate size 0
 rejected size 0
 }}}

 According to Alexander Bartolich:

 It triggers three problems in the following code:

 {{{
      if ($cvtdate < $first_date_cvt) {
        $first_date_cvt = $cvtdate;
        $first_date = "$day $hour";
      }
      elsif ($cvtdate > $last_date_cvt) {
        $last_date_cvt = $cvtdate;
        $last_date = "$day $hour";
      }
 }}}

 1. There is no check for wrap-around in date values, i.e. the code assumes
 the log covers the range from January to December.  Interestingly function
 DateCompare (used for a different purpose) does make such a check.

 2. If log entries are sorted descending then $last_date is never assigned
 to.

 3. If the log consists of only one line then $last_date is never assigned
 to.

-- 
Ticket URL: <http://inn.eyrie.org/trac/ticket/41#comment:1>
INN <http://www.eyrie.org/~eagle/software/inn/>
InterNetNews


More information about the inn-bugs mailing list