Nmap Development mailing list archives

Re: TIMEVAL_SEC_SUBTRACT bug


From: Fyodor <fyodor () insecure org>
Date: Wed, 22 Aug 2001 22:49:37 -0700

On Wed, Aug 22, 2001 at 10:29:25PM -0700, Scott Renfro wrote:

However, TIMEVAL_SEC_SUBTRACT() is defined in utils.h as

   ((a).tv_sec - (b).tv_sec + ((a).tv_usec - (b).tv_usec + 500)/1000)

Notice that the right half is in microseconds, but the code divides by
1000 as though it were milliseconds. 

Good find!  That is what I get for copying and pasting from
TIMEVAL_MSEC_SUBTRACT().  I have made the change for the next version
of Nmap.  Fortunately, that macro is only used in 1 place in the Nmap
code.

Cheers,
-F

---------------------------------------------------------------------
For help using this (nmap-dev) mailing list, send a blank email to 
nmap-dev-help () insecure org . List run by ezmlm-idx (www.ezmlm.org).



Current thread: