Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit41e364e

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'refailing 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 parent760c770 commit41e364e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎contrib/pg_upgrade/check.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,7 @@ get_canonical_locale_name(int category, const char *locale)
990990
char*save;
991991
char*res;
992992

993+
/* get the current setting, so we can restore it. */
993994
save=setlocale(category,NULL);
994995
if (!save)
995996
pg_fatal("failed to get the current locale\n");
@@ -1001,7 +1002,7 @@ get_canonical_locale_name(int category, const char *locale)
10011002
res=setlocale(category,locale);
10021003

10031004
if (!res)
1004-
pg_fatal("failed to get systemlocal name for \"%s\"\n",res);
1005+
pg_fatal("failed to get systemlocale name for \"%s\"\n",locale);
10051006

10061007
res=pg_strdup(res);
10071008

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp