diff --git a/CHANGELOG b/CHANGELOG index 1e2c47097..aac9e8ab0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ #Nmap Changelog ($Id$); -*-text-*- +o [NSE][GH#2136][GH#2137] Rectify error "time result cannot be represented..." + in the FP library. [Clément Notin, nnposter] + o [NSE] Script mysql-audit now defaults to the bundled mysql-cis.audit for the audit rule base. [nnposter] diff --git a/nselib/afp.lua b/nselib/afp.lua index 84c26fb40..18c49c287 100644 --- a/nselib/afp.lua +++ b/nselib/afp.lua @@ -350,7 +350,9 @@ local ERROR_MSG = { [ERROR.FPCallNotSupported] = "Server does not support this command.", } -local TIME_OFFSET = os.time{year=2000, month=1, day=1, hour=0} - os.time{year=1970, month=1, day=1, hour=0} +-- Dates are shifted forward one day to avoid referencing 12/31/1969 UTC +-- when specifying 1/1/1970 (local) in a timezone that is ahead of UTC +local TIME_OFFSET = os.time({year=2000, month=1, day=2, hour=0}) - os.time({year=1970, month=1, day=2, hour=0}) -- Check if all the bits in flag are set in bitmap. local function flag_is_set(bitmap, flag)