mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user