]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0639: channel timeout may wrap around v9.1.0639
authorKen Takata <kentkt@csc.jp>
Mon, 29 Jul 2024 18:39:12 +0000 (20:39 +0200)
committerChristian Brabandt <cb@256bit.org>
Mon, 29 Jul 2024 18:39:12 +0000 (20:39 +0200)
Problem:  channel timeout may wrap around
Solution: Correct timeout calculation when GetTickCount() wraps around
          (Ken Takata)

closes: #15390

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/channel.c
src/version.c

index b99b3a90ae1b0a7435ade8d390b628d4ccc239f0..69bbff24e9d07ebd02e19e98d30b61530860a7b5 100644 (file)
@@ -2277,7 +2277,7 @@ channel_parse_json(channel_T *channel, ch_part_T part)
        {
            int timeout;
 #ifdef MSWIN
-           timeout = GetTickCount() > chanpart->ch_deadline;
+           timeout = (int)(GetTickCount() - chanpart->ch_deadline) > 0;
 #else
            {
                struct timeval now_tv;
index f8d1762b843ab3e39b34791d97d62337de6fa3db..97414a08a36f5cfbf23b2a990ca44468d0e9345b 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    639,
 /**/
     638,
 /**/