summaryrefslogtreecommitdiff
path: root/src/common/file_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/file_utils.c')
-rw-r--r--src/common/file_utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/file_utils.c b/src/common/file_utils.c
index 72b0565c71..218b83f391 100644
--- a/src/common/file_utils.c
+++ b/src/common/file_utils.c
@@ -166,7 +166,7 @@ walkdir(const char *path,
while (errno = 0, (de = readdir(dir)) != NULL)
{
- char subpath[MAXPGPATH];
+ char subpath[MAXPGPATH * 2];
struct stat fst;
int sret;
@@ -174,7 +174,7 @@ walkdir(const char *path,
strcmp(de->d_name, "..") == 0)
continue;
- snprintf(subpath, MAXPGPATH, "%s/%s", path, de->d_name);
+ snprintf(subpath, sizeof(subpath), "%s/%s", path, de->d_name);
if (process_symlinks)
sret = stat(subpath, &fst);