Skip to content

Commit c1b242b

Browse files
committed
Fix potential coredump on bad locale value in pg_upgrade.
Thinko in error report (and a typo in the message text, too). We're failing anyway, but it would be good to print something useful first. Noted while reviewing a patch to make pg_upgrade's locale code laxer.
1 parent a4aa854 commit c1b242b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/pg_upgrade/check.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,7 @@ get_canonical_locale_name(int category, const char *locale)
10041004
res = setlocale(category, locale);
10051005

10061006
if (!res)
1007-
pg_log(PG_FATAL, "failed to get system local name for \"%s\"\n", res);
1007+
pg_log(PG_FATAL, "failed to get system locale name for \"%s\"\n", locale);
10081008

10091009
res = pg_strdup(res);
10101010

0 commit comments

Comments
 (0)