From ef9d6aa70d68cd3a765ed55f4c3781aeb8aeea23 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 11 Apr 2011 16:56:35 +0200 Subject: updated for version 7.3.160 Problem: Unsafe string copying. Solution: Use vim_strncpy() instead of strcpy(). Use vim_strcat() instead of strcat(). --- src/buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index 420b5ea914..f925129834 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -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 -- cgit v1.2.3