Skip to content

Commit

Permalink
Use integer division for timestamps. Fixes nmap#1255
Browse files Browse the repository at this point in the history
  • Loading branch information
bonsaiviking committed Jun 29, 2018
1 parent d25b4df commit 14f439a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nselib/msrpctypes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,7 @@ function unmarshall_NTTIME(data, pos)
end

if(time ~= 0) then
time = (time / 10000000) - 11644473600
time = (time // 10000000) - 11644473600
end

stdnse.debug4("MSRPC: Leaving unmarshall_NTTIME()")
Expand Down Expand Up @@ -1269,7 +1269,7 @@ function unmarshall_hyper(data, pos)
stdnse.debug4("MSRPC: Entering unmarshall_hyper()")

pos, result = unmarshall_int64(data, pos)
result = result / -10000000
result = result // -10000000

stdnse.debug4("MSRPC: Leaving unmarshall_hyper()")
return pos, result
Expand Down

0 comments on commit 14f439a

Please sign in to comment.