mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
updated for version 7.3.160
Problem: Unsafe string copying. Solution: Use vim_strncpy() instead of strcpy(). Use vim_strcat() instead of strcat().
This commit is contained in:
@@ -3176,7 +3176,7 @@ maketitle()
|
||||
/* format: "fname + (path) (1 of 2) - VIM" */
|
||||
|
||||
if (curbuf->b_fname == NULL)
|
||||
STRCPY(buf, _("[No Name]"));
|
||||
vim_strncpy(buf, (char_u *)_("[No Name]"), IOSIZE - 100);
|
||||
else
|
||||
{
|
||||
p = transstr(gettail(curbuf->b_fname));
|
||||
@@ -3232,7 +3232,7 @@ maketitle()
|
||||
if (serverName != NULL)
|
||||
{
|
||||
STRCAT(buf, " - ");
|
||||
STRCAT(buf, serverName);
|
||||
vim_strcat(buf, serverName, IOSIZE);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user