mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
coverity/155511: Pass correct length argument to strncat()
This commit is contained in:
parent
8bc2bffda9
commit
5369b0c7ea
@ -1408,8 +1408,8 @@ char_u *make_filter_cmd(char_u *cmd, char_u *itmp, char_u *otmp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (itmp != NULL) {
|
if (itmp != NULL) {
|
||||||
strncat(buf, " < ", len);
|
strncat(buf, " < ", len - 1);
|
||||||
strncat(buf, (char *) itmp, len);
|
strncat(buf, (const char *)itmp, len - 1);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
// For shells that don't understand braces around commands, at least allow
|
// For shells that don't understand braces around commands, at least allow
|
||||||
|
Loading…
Reference in New Issue
Block a user