neatvi
neatvi copied to clipboard
fix ex.c:767 snprintf missing format parameter
mattn @.***> wrote:
@mattn commented on this pull request.
@@ -764,7 +764,7 @@ static int ec_ft(char *ec) char arg[EXLEN]; ex_arg(ec, arg); if (arg[0])
snprintf(bufs[0].ft, sizeof(bufs[0].ft), arg);
snprintf(bufs[0].ft, sizeof(bufs[0].ft), "%s", arg);
This has been already applied (commit 64692972).
Simply:
strncpy(bufs[0].ft, arg, sizeof(bufs[0].ft)-1);
Though it may not be necessary here, some care is necessary regarding the NUL byte when using strncpy.
Thanks, Ali