aboutsummaryrefslogtreecommitdiff
path: root/src/common/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/exec.c')
-rw-r--r--src/common/exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/exec.c b/src/common/exec.c
index 4aadfd7fd01..037bef2210c 100644
--- a/src/common/exec.c
+++ b/src/common/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))
{