1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-03-12 18:13:50 -05:00
Simon Tatham b8dd15b8ff Stop using abs(unsigned) in X11 time comparison.
The validation end of XDM-AUTHORIZATION-1 needs to check that two
time_t values differ by at most XDM_MAXSKEW, which it was doing by
subtracting them and passing the result to abs(). This provoked a
warning from OS X's clang, on the reasonable enough basis that the
value passed to abs was unsigned.

Fixed by using the (well defined) unsigned arithmetic wraparound: to
check that the mathematical difference of two unsigned numbers is in
the interval [-k,+k], compute their difference _plus k_ as an
unsigned, and check the result is in the interval [0,2k] by doing an
unsigned comparison against 2k.
2015-08-27 18:44:51 +01:00
..
2015-01-05 23:48:11 +00:00
2006-12-19 10:28:44 +00:00
2015-01-05 23:49:25 +00:00
2015-07-25 10:54:57 +01:00