Prevent integer overflow within the integer-datetimes version of

Tom Lane <tgl@sss.pgh.pa.us>

Commit: b9ff7443e63f25f73d45b35afe65a85d98a57256
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2008-01-23T21:26:13Z
Releases: 8.3.0
Prevent integer overflow within the integer-datetimes version of
TimestampTzPlusMilliseconds.  An integer argument of more than INT_MAX/1000
milliseconds (ie, about 35 minutes) would provoke a wrong result, resulting
in incorrect enforcement of statement_timestamp values larger than that.
Bug was introduced in my rewrite of 2006-06-20, which fixed some other
overflow risks, but missed this one :-(  Per report from Elein.

Files

PathChange+/−
src/include/utils/timestamp.h modified +2 −2