Bounds exception after 24 days of uptime
Brought to you by:
tpsfadmin
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.