diff options
author | ZyX <kp-pav@yandex.ru> | 2017-01-23 02:05:17 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-01-23 02:05:17 +0300 |
commit | 5369b0c7eac1711653aeecb8fcb8ca3a5f5fdfc1 (patch) | |
tree | ce4b39cd77c7a222bdb39aab084b40ecf6379435 | |
parent | 8bc2bffda94bf2de4e8adae57b4b5597ed4e8247 (diff) | |
download | rneovim-5369b0c7eac1711653aeecb8fcb8ca3a5f5fdfc1.tar.gz rneovim-5369b0c7eac1711653aeecb8fcb8ca3a5f5fdfc1.tar.bz2 rneovim-5369b0c7eac1711653aeecb8fcb8ca3a5f5fdfc1.zip |
coverity/155511: Pass correct length argument to strncat()
-rw-r--r-- | src/nvim/ex_cmds.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 69eed33736..da629cd4a1 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -1408,8 +1408,8 @@ char_u *make_filter_cmd(char_u *cmd, char_u *itmp, char_u *otmp) } if (itmp != NULL) { - strncat(buf, " < ", len); - strncat(buf, (char *) itmp, len); + strncat(buf, " < ", len - 1); + strncat(buf, (const char *)itmp, len - 1); } #else // For shells that don't understand braces around commands, at least allow |