Subject: [quicwg/base-drafts] Prevent int underflow (#2065)

From: ianswett <[email-masked]>
Date: Wed, 28 Nov 2018 21:34:50 +0000 (UTC)

Fixes #2052
You can view, comment on, or merge this pull request online at:

  https://github.com/quicwg/base-drafts/pull/2065

-- Commit Summary --

  * Prevent int underflow

-- File Changes --

    M draft-ietf-quic-recovery.md (4)

-- Patch Links --

https://github.com/quicwg/base-drafts/pull/2065.patch
https://github.com/quicwg/base-drafts/pull/2065.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/2065

---

From: Martin Thomson <[email-masked]>
Date: Wed, 28 Nov 2018 15:56:59 -0800

martinthomson commented on this pull request.

> @@ -848,8 +848,8 @@ Pseudocode for SetLossDetectionTimer follows:
       return
     if (loss_time != 0):
       // Early retransmit timer or time loss detection.
-      timeout = loss_time -
-        time_of_last_sent_retransmittable_packet
+      loss_detection_timer.set(loss_time)
+      return
     else:

You don't need an else clause if you are going to exit.  But this might set the timer to some time in the past if we're not careful with setting loss_time.  I have a PR that might help inbound.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/2065#pullrequestreview-179574787