diff options
Diffstat (limited to 'src/port/exec.c')
-rw-r--r-- | src/port/exec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/port/exec.c b/src/port/exec.c index 01203c056cc..8ce7c618ffc 100644 --- a/src/port/exec.c +++ b/src/port/exec.c @@ -68,7 +68,7 @@ validate_exec(const char *path) if (strlen(path) >= strlen(".exe") && pg_strcasecmp(path + strlen(path) - strlen(".exe"), ".exe") != 0) { - strcpy(path_exe, path); + strlcpy(path_exe, path, sizeof(path_exe) - 4); strcat(path_exe, ".exe"); path = path_exe; } @@ -277,7 +277,7 @@ resolve_symlinks(char *path) } /* must copy final component out of 'path' temporarily */ - strcpy(link_buf, fname); + strlcpy(link_buf, fname, sizeof(link_buf)); if (!getcwd(path, MAXPGPATH)) { |