Обсуждение: pgsql: Fix pg_tzset() to ensure that 'lclmem' (the static variable

Поиск
Список
Период
Сортировка

pgsql: Fix pg_tzset() to ensure that 'lclmem' (the static variable

От
tgl@postgresql.org (Tom Lane)
Дата:
Log Message:
-----------
Fix pg_tzset() to ensure that 'lclmem' (the static variable holding
the localtime timezone data) is not overwritten until we know the data
is good.  tzload() is capable of failing after having begun modifying
the struct it's pointed at, and in such cases the static data was left
in a corrupt state.  Bug does not exist pre-8.0 (since we didn't have
this code then) nor post-8.0 (since we already changed the code to
tzload into local variables initially).  Per report from Nick Martens.

Tags:
----
REL8_0_STABLE

Modified Files:
--------------
    pgsql/src/timezone:
        localtime.c (r1.9 -> r1.9.4.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/timezone/localtime.c.diff?r1=1.9&r2=1.9.4.1)