pan-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pan-devel] newsrc corruption theory (Was: Pan 0.91 issues)


From: Charles Kerr
Subject: Re: [Pan-devel] newsrc corruption theory (Was: Pan 0.91 issues)
Date: Thu, 6 Apr 2006 17:54:21 -0500 (CDT)
User-agent: SquirrelMail/1.4.6 [CVS]

> On Thu, 06 Apr, 2006 at 20:51 +0200, Charles Kerr wrote:
>> More ideas on this. 4294967295 is ULONG_MAX.
>>
>> task-xover.cc sets _high to max (_high, number) on each xover line
>> where number is gotten with strtoul() from the xover line.  strtoul()
>> handles an overflow condition by returning ULONG_MAX and setting errno
>> to ERANGE.  Currently the TaskXOver::on_nntp_line() doesn't have any
>> errno checking...
>
> That doesn't appear to be it.  The bug seems to be in
> DataImpl::set_xover_low. Put some debugging info in there:
>
> set_xover_low: group=easynet.test. low=1586. newsrc was 0-1641
> set_xover_low: easynet.test. newsrc is now 0-4294967295
>
> I suspect calling _read.mark_range (0, 1586, false) when the range is
> 0-1641 should result in a range of 1586-1641, right ?

Oh fun... this bug in numbers.cc, which is ported from the old code,
so this bug probably exists there too.

Does this fix it for you?

--- numbers.cc.bak      2006-04-06 16:32:11.000000000 -0500
+++ numbers.cc  2006-04-06 17:53:20.000000000 -0500
@@ -148,13 +148,13 @@
          ++high_index;
          i += 2;
       }
-      else if (r.contains(ur.low)) // change high
+      else if (ur.low!=r.low && r.contains(ur.low)) // change high
       {
          retval += r.high+1 - ur.low;
          r.high = ur.low-1;
          ++i;
       }
-      else if (r.contains(ur.high)) // change low
+      else if (ur.high!=r.high && r.contains(ur.high)) // change low
       {
          retval += ur.high+1 - r.low;
          r.low = ur.high+1;

cheers,
Charles






reply via email to

[Prev in Thread] Current Thread [Next in Thread]