Mercurial > vim
comparison src/ui.c @ 23479:39d62cdde492 v8.2.2282
patch 8.2.2282: length check mismatch with argument of strncmp()
Commit: https://github.com/vim/vim/commit/339c1bdbdfb823c4ea36242f0a4f083cbc010b84
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 2 20:14:23 2021 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 02 Jan 2021 20:15:03 +0100 |
parents | a0fc14114576 |
children | 8dbebce07695 |
comparison
equal
deleted
inserted
replaced
23478:5e697f307c06 | 23479:39d62cdde492 |
---|---|
1010 len + unconverted, INBUFLEN - inbufcount, | 1010 len + unconverted, INBUFLEN - inbufcount, |
1011 rest == NULL ? &rest : NULL, &restlen); | 1011 rest == NULL ? &rest : NULL, &restlen); |
1012 } | 1012 } |
1013 while (len-- > 0) | 1013 while (len-- > 0) |
1014 { | 1014 { |
1015 /* | 1015 // If a CTRL-C was typed, remove it from the buffer and set |
1016 * If a CTRL-C was typed, remove it from the buffer and set | 1016 // got_int. Also recognize CTRL-C with modifyOtherKeys set, in two |
1017 * got_int. Also recognize CTRL-C with modifyOtherKeys set, in two | 1017 // forms. |
1018 * forms. | |
1019 */ | |
1020 if (ctrl_c_interrupts && (inbuf[inbufcount] == 3 | 1018 if (ctrl_c_interrupts && (inbuf[inbufcount] == 3 |
1021 || (len >= 9 && STRNCMP(inbuf + inbufcount, | 1019 || (len >= 10 && STRNCMP(inbuf + inbufcount, |
1022 "\033[27;5;99~", 10) == 0) | 1020 "\033[27;5;99~", 10) == 0) |
1023 || (len >= 7 && STRNCMP(inbuf + inbufcount, | 1021 || (len >= 7 && STRNCMP(inbuf + inbufcount, |
1024 "\033[99;5u", 7) == 0))) | 1022 "\033[99;5u", 7) == 0))) |
1025 { | 1023 { |
1026 // remove everything typed before the CTRL-C | 1024 // remove everything typed before the CTRL-C |