Skip to content

Commit 7cd07de

Browse files
author
hackorum
committed
Apply initdb_too_long_dirname_v1.patch
1 parent b597835 commit 7cd07de

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/bin/initdb/initdb.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2922,6 +2922,12 @@ create_data_directory(void)
29222922
{
29232923
int ret;
29242924

2925+
if (strlen(pg_data) > MAXPGPATH)
2926+
{
2927+
pg_log_error("too long directory name\"%s\": %m", pg_data);
2928+
exit(1);
2929+
}
2930+
29252931
switch ((ret = pg_check_dir(pg_data)))
29262932
{
29272933
case 0:

0 commit comments

Comments
 (0)