summaryrefslogtreecommitdiff
path: root/src/netbeans.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2011-04-11 16:56:35 +0200
committerBram Moolenaar <Bram@vim.org>2011-04-11 16:56:35 +0200
commitef9d6aa70d68cd3a765ed55f4c3781aeb8aeea23 (patch)
treee099b52d0ebf51c535ebe3cd875d8f70c06332df /src/netbeans.c
parent0d35e91abfa9e17f7c554bfd33b119b879448c72 (diff)
downloadvim-git-ef9d6aa70d68cd3a765ed55f4c3781aeb8aeea23.tar.gz
updated for version 7.3.160v7.3.160
Problem: Unsafe string copying. Solution: Use vim_strncpy() instead of strcpy(). Use vim_strcat() instead of strcat().
Diffstat (limited to 'src/netbeans.c')
-rw-r--r--src/netbeans.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/netbeans.c b/src/netbeans.c
index c3bfa50ac..874edf41c 100644
--- a/src/netbeans.c
+++ b/src/netbeans.c
@@ -3914,14 +3914,12 @@ print_save_msg(buf, nchars)
}
else
{
- char_u ebuf[BUFSIZ];
-
- STRCPY(ebuf, (char_u *)_("E505: "));
- STRCAT(ebuf, IObuff);
- STRCAT(ebuf, (char_u *)_("is read-only (add ! to override)"));
- STRCPY(IObuff, ebuf);
- nbdebug((" %s\n", ebuf ));
- emsg(IObuff);
+ char_u msgbuf[IOSIZE];
+
+ vim_snprintf((char *)msgbuf, IOSIZE,
+ _("E505: %s is read-only (add ! to override)"), IObuff);
+ nbdebug((" %s\n", msgbuf));
+ emsg(msgbuf);
}
}