Menu

#63 Bounds exception after 24 days of uptime

open
nobody
Transports (6)
5
2013-01-13
2003-01-31
Curt Mayers
No

In FFProt, the TffConnection.InitCode method gets a
starting value for a codeblock by saving a GetTickCount.
value to a DWORD. This value is then used in the
GenerateCode procedure, where it's passed as a
LongInt, and the value is MODed against a constant to
produce a seed value.

If the machine's tick count is greater than High(Integer)
(After about 25 days of uptime), this produces a
NEGATIVE value when used as a signed integer. This
value is then MODed against 256 to fit in a Byte. But,
because it's negative, range exception occurs, and no
more connections can be established.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB