Mercurial > vim
diff src/ex_docmd.c @ 2768:c5e47b752f07 v7.3.160
updated for version 7.3.160
Problem: Unsafe string copying.
Solution: Use vim_strncpy() instead of strcpy(). Use vim_strcat() instead
of strcat().
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Mon, 11 Apr 2011 16:56:35 +0200 |
parents | ea399ac2c1b9 |
children | 25672ad7f377 |
line wrap: on
line diff
--- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -5096,7 +5096,9 @@ check_more(message, forceit) char_u buff[IOSIZE]; if (n == 1) - STRCPY(buff, _("1 more file to edit. Quit anyway?")); + vim_strncpy(buff, + (char_u *)_("1 more file to edit. Quit anyway?"), + IOSIZE - 1); else vim_snprintf((char *)buff, IOSIZE, _("%d more files to edit. Quit anyway?"), n);