summaryrefslogtreecommitdiff
path: root/src/misc1.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc1.c')
-rw-r--r--src/misc1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/misc1.c b/src/misc1.c
index 6603c26d9..d4dabe634 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -3295,7 +3295,7 @@ init_homedir()
if (exp != NULL && *exp != NUL
&& STRLEN(exp) + STRLEN(p) < MAXPATHL)
{
- sprintf((char *)NameBuff, "%s%s", exp, p + 1);
+ vim_snprintf((char *)NameBuff, MAXPATHL, "%s%s", exp, p + 1);
var = NameBuff;
/* Also set $HOME, it's needed for _viminfo. */
vim_setenv((char_u *)"HOME", NameBuff);