coverity/155511: Pass correct length argument to strncat()

This commit is contained in:
ZyX 2017-01-23 02:05:17 +03:00
parent 8bc2bffda9
commit 5369b0c7ea

View File

@ -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