neovim/src
zeertzjq d65788052f
vim-patch:9.1.0650: Coverity warning in cstrncmp() (#29944)
Problem:  Coverity warning in cstrncmp()
          (after v9.1.0645)
Solution: Change the type of n2 to int.
          (zeertzjq)

________________________________________________________________________________________________________
*** CID 1615684:  Integer handling issues  (INTEGER_OVERFLOW)
/src/regexp.c: 1757 in cstrncmp()
1751                 n1 -= mb_ptr2len(s1);
1752                 MB_PTR_ADV(p);
1753                 n2++;
1754             }
1755             // count the number of bytes to advance the same number of chars for s2
1756             p = s2;
>>>     CID 1615684:  Integer handling issues  (INTEGER_OVERFLOW)
>>>     Expression "n2--", which is equal to 18446744073709551615, where "n2" is known to be equal to 0, underflows the type that receives it, an unsigned integer 64 bits wide.
1757             while (n2-- > 0 && *p != NUL)
1758                 MB_PTR_ADV(p);
1759
1760             n2 = p - s2;
1761
1762             result = MB_STRNICMP2(s1, s2, *n, n2);

closes: vim/vim#15409

e8feaa354e
2024-08-01 22:09:23 +00:00
..
cjson fix(vim.json): properly treat luanil options as booleans (#28622) 2024-05-03 19:26:56 +08:00
klib feat(lua): pass keys before mapping to vim.on_key() callback (#28098) 2024-03-31 11:20:05 +08:00
man docs: misc (#28837) 2024-06-07 10:55:14 +08:00
mpack fix: buffer overrun in lmpack_session_receive 2024-02-06 01:07:54 +02:00
nvim vim-patch:9.1.0650: Coverity warning in cstrncmp() (#29944) 2024-08-01 22:09:23 +00:00
termkey feat(tui): parse CSI subparams in termkey (#29805) 2024-07-21 21:47:37 -05:00
unicode feat: update unicode tables (#27317) 2024-02-04 06:28:51 +08:00
xdiff refactor: the long goodbye 2023-11-05 20:19:06 +01:00
.valgrind.supp
bit.c feat(lua): make sure require'bit' always works, even with PUC lua 5.1 2023-02-22 22:15:19 +01:00
bit.h feat(lua): make sure require'bit' always works, even with PUC lua 5.1 2023-02-22 22:15:19 +01:00
clint.py refactor(declarations): also generate prototypes for functions in headers 2024-07-13 12:30:49 +02:00
coverity-model.c refactor(treesitter): handle coverity warnings better 2024-03-20 12:22:54 +00:00
nlua0.c refactor(build): include lpeg as a library 2023-04-27 11:40:00 +02:00
uncrustify.cfg build: bump uncrustify to version 0.79.0 (#28756) 2024-05-15 12:28:19 +02:00