patch 8.2.2282: length check mismatch with argument of strncmp()
Problem: Length check mismatch with argument of strncmp(). (Christian
Brabandt)
Solution: Adjust length check.
diff --git a/src/ui.c b/src/ui.c
index d29c26d..ed56527 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -1012,13 +1012,11 @@
}
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)))