]> git.feebdaed.xyz Git - 0xmirror/nginx.git/commit
QUIC: ngx_msec_t overflow protection.
authorRoman Arutyunyan <arut@nginx.com>
Mon, 10 Mar 2025 08:19:25 +0000 (12:19 +0400)
committerRoman Arutyunyan <arutyunyan.roman@gmail.com>
Tue, 15 Apr 2025 15:01:36 +0000 (19:01 +0400)
commit1e883a40db98b70e422ff8e4d1d0e87e3f8ccaa5
tree2eb1f21e6e3cad971c16534c482b21f0cadc633e
parent38236bf74f3e5728eeea488bef381c61842ac1d2
QUIC: ngx_msec_t overflow protection.

On some systems the value of ngx_current_msec is derived from monotonic
clock, for which the following is defined by POSIX:

   For this clock, the value returned by clock_gettime() represents
   the amount of time (in seconds and nanoseconds) since an unspecified
   point in the past.

As as result, overflow protection is needed when comparing two ngx_msec_t.
The change adds such protection to the ngx_quic_detect_lost() function.
src/event/quic/ngx_event_quic_ack.c