diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2021-09-26 16:53:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-26 07:53:51 -0700 |
commit | c273eb310098a4ddae577401aca5e07b45107f48 (patch) | |
tree | a1256f54d40e86d98c551a699d90e818dbbc1f04 /src/nvim/eval.c | |
parent | 68d6ff880249cd91993b376dadfb130c24a95f82 (diff) | |
download | rneovim-c273eb310098a4ddae577401aca5e07b45107f48.tar.gz rneovim-c273eb310098a4ddae577401aca5e07b45107f48.tar.bz2 rneovim-c273eb310098a4ddae577401aca5e07b45107f48.zip |
refactor: replace sprintf with snprintf #15794
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 90bff854d9..768b82b464 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -8807,9 +8807,9 @@ char_u *set_cmdarg(exarg_T *eap, char_u *oldarg) char_u *newval = xmalloc(newval_len); if (eap->force_bin == FORCE_BIN) { - sprintf((char *)newval, " ++bin"); + snprintf((char *)newval, newval_len, " ++bin"); } else if (eap->force_bin == FORCE_NOBIN) { - sprintf((char *)newval, " ++nobin"); + snprintf((char *)newval, newval_len, " ++nobin"); } else { *newval = NUL; } |