diff options
author | Bram Moolenaar <Bram@vim.org> | 2011-04-11 16:56:35 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2011-04-11 16:56:35 +0200 |
commit | ef9d6aa70d68cd3a765ed55f4c3781aeb8aeea23 (patch) | |
tree | e099b52d0ebf51c535ebe3cd875d8f70c06332df /src/netbeans.c | |
parent | 0d35e91abfa9e17f7c554bfd33b119b879448c72 (diff) | |
download | vim-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.c | 14 |
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); } } |