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

Commit3117afa

Browse files
committed
Fix crash when reading 'timezone = unknown' from postgresql.conf during
SIGHUP; it's not OK for an assign_hook to return a non-malloc'd string.Problem was introduced during timezone library rewrite.
1 parent2dd9672 commit3117afa

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

‎src/backend/commands/variable.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/backend/commands/variable.c,v 1.112 2005/07/25 22:12:32 tgl Exp $
12+
* $PostgreSQL: pgsql/src/backend/commands/variable.c,v 1.113 2005/08/08 23:39:01 tgl Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -346,10 +346,13 @@ assign_timezone(const char *value, bool doit, GucSource source)
346346
* pg_timezone_initialize() will eventually select a default
347347
* value from the environment.
348348
*/
349-
constchar*curzone=pg_get_timezone_name(global_timezone);
349+
if (doit)
350+
{
351+
constchar*curzone=pg_get_timezone_name(global_timezone);
350352

351-
if (curzone)
352-
value=curzone;
353+
if (curzone)
354+
value=curzone;
355+
}
353356
}
354357
else
355358
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp