#189 htdig may hang on OpenVMS/Alpha due to time_t overflow

Include_in_3.2
closed-fixed
nobody
htdig (103)
5
2003-10-27
2003-10-24
No

See htdig-Patches-548448, or ftp://ftp.ccsf.org/htdig-
patches/3.1.6/time_t.1, which apparently should be adapted
to the 3.2 code. 3.2 does things differently, but the same
potential for overflow appears to exist.

Patches item #548448, was opened at 2002-04-25 08:27
You can respond by visiting:
http://sourceforge.net/tracker/
?func=detail&atid=304593&aid=548448&group_id=4593
Category: stable
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Martin Vorlaender (martinv2)
Assigned to: Nobody/Anonymous (nobody)
Summary: Cope with unsigned time_t type

Initial Comment:
While porting ht://Dig to OpenVMS/Alpha, I saw a program
hang due to the fact that the time arithmetic in htdig/
server.cc:Server::delay overflows if time_t is an unsigned
type (which is the case in Compaq C++). To remedy it, just
rearrange the calculation.

Discussion

  • Lachlan Andrew
    Lachlan Andrew
    2003-10-25

    Logged In: YES
    user_id=663373

    The attached patch avoids negative numbers. I'll submit it.
    Gilles, can you please check it and close this bug? Thanks :)

     
  • Lachlan Andrew
    Lachlan Andrew
    2003-10-25

     
    Attachments
    tmp
  • Lachlan Andrew
    Lachlan Andrew
    2003-10-25

    • status: open --> open-fixed
     
  • Logged In: YES
    user_id=149687

    I can't actually test it on OpenVMS, but a visual check
    confirms that it does the equivalent of Martin's patch for
    3.1.6, and thus it should avoid negatives. It also doesn't
    break anything (at least nothing that's not already broken -
    see bug #831407).

     
    • status: open-fixed --> closed-fixed
     
  • Logged In: YES
    user_id=149687

    I can't actually test it on OpenVMS, but a visual check
    confirms that it does the equivalent of Martin's patch for
    3.1.6, and thus it should avoid negatives. It also doesn't
    break anything (at least nothing that's not already broken -
    see bug #831407).