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

Re: [leafnode-list] Bug in texpire

From: Andreas Ferber <aferber@xxxxxxxxxxxxxxxxxxxxxxxx>

> I wanted one newsgroup to never expire, so I set the expiretime
> some astronomical value (in my case 36500 for 100 Years).  This

This is the number of days...

> The problem is, that in configutil.c the expire times are not
> against overflows.  I have written a small patch to fix this
> (it's against version 1.9.12, though it should work with other

Nice patch, but...
IMHO a better fix would be to change the comparison so that the
message is checked against the value entered (number of days)
instead of against the much larger equivalent number of seconds.
I haven't looked at the code (I'm off to work as soon as I hit
SEND) but it seems to me that there must be a:

   if(  seconds_message_aged > seconds_equivalent_to_expiry_days )

which should be changed to:

   if(  (seconds_message_aged / (60*60*24)) > expiry_days  )

which would need no overflow check.

Of course, you will still loose messages in a dozen decades or so
if you haven't upgraded to a 64 bit processor.  I'd put that
order in now in case it gets back-ordered!

Oisin  "Curly++"  Curtin                     ocurtin@SPAM@usa.net
Surface Liaison, Minetown Digger                    Send no SPAM@

leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list