mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 22:38:16 +00:00
Remove '- 1' for sizes passed to xstrlcpy
xstrlcpy() NUL-terminates the destination string such that reducing the destination string length by 1 to reserve the last byte for NUL is pointless. https://github.com/neovim/neovim/pull/14490#discussion_r635661185
This commit is contained in:
@@ -1619,7 +1619,7 @@ void list_hashtable_vars(hashtab_T *ht, const char *prefix, int empty,
|
||||
char buf[IOSIZE];
|
||||
|
||||
// apply :filter /pat/ to variable name
|
||||
xstrlcpy(buf, prefix, IOSIZE - 1);
|
||||
xstrlcpy(buf, prefix, IOSIZE);
|
||||
xstrlcat(buf, (char *)di->di_key, IOSIZE);
|
||||
if (message_filtered((char_u *)buf)) {
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user