]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.2282: length check mismatch with argument of strncmp() v8.2.2282
authorBram Moolenaar <Bram@vim.org>
Sat, 2 Jan 2021 19:14:23 +0000 (20:14 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 2 Jan 2021 19:14:23 +0000 (20:14 +0100)
Problem:    Length check mismatch with argument of strncmp(). (Christian
            Brabandt)
Solution:   Adjust length check.

src/ui.c
src/version.c

index d29c26dab3e63b7aac7652e2f795b1d640d925bd..ed565276c8c52fa015c720e231b7752220fb74fb 100644 (file)
--- a/src/ui.c
+++ b/src/ui.c
@@ -1012,13 +1012,11 @@ fill_input_buf(int exit_on_error UNUSED)
        }
        while (len-- > 0)
        {
-           /*
-            * If a CTRL-C was typed, remove it from the buffer and set
-            * got_int.  Also recognize CTRL-C with modifyOtherKeys set, in two
-            * forms.
-            */
+           // If a CTRL-C was typed, remove it from the buffer and set
+           // got_int.  Also recognize CTRL-C with modifyOtherKeys set, in two
+           // forms.
            if (ctrl_c_interrupts && (inbuf[inbufcount] == 3
-                       || (len >= 9 && STRNCMP(inbuf + inbufcount,
+                       || (len >= 10 && STRNCMP(inbuf + inbufcount,
                                                   "\033[27;5;99~", 10) == 0)
                        || (len >= 7 && STRNCMP(inbuf + inbufcount,
                                                       "\033[99;5u", 7) == 0)))
index b54cf0a39582722acc3f8bc8d25358805cb01b31..ed0b10236b31afeaeef63e8b88e76916c0d3b635 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2282,
 /**/
     2281,
 /**/