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/hardcopy.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/hardcopy.c')
-rw-r--r-- | src/hardcopy.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hardcopy.c b/src/hardcopy.c index 0747dc9d3..2310484f9 100644 --- a/src/hardcopy.c +++ b/src/hardcopy.c @@ -1761,12 +1761,12 @@ prt_find_resource(name, resource) { char_u buffer[MAXPATHL + 1]; - STRCPY(resource->name, name); + vim_strncpy(resource->name, (char_u *)name, 63); /* Look for named resource file in runtimepath */ STRCPY(buffer, "print"); add_pathsep(buffer); - STRCAT(buffer, name); - STRCAT(buffer, ".ps"); + vim_strcat(buffer, (char_u *)name, MAXPATHL); + vim_strcat(buffer, (char_u *)".ps", MAXPATHL); resource->filename[0] = NUL; return (do_in_runtimepath(buffer, FALSE, prt_resource_name, resource->filename) |