]> granicus.if.org Git - postgresql/commit
Fix pg_tzset() to ensure that 'lclmem' (the static variable holding
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 10 Jan 2006 20:16:25 +0000 (20:16 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 10 Jan 2006 20:16:25 +0000 (20:16 +0000)
commit2946ccf35f3a2ba1f3eb78bdc24433ad2d472192
treeb8616db0f172af73c0ab1b10e7a4a2b57a727149
parent95f88ddf4940ec2b1adf3e251f54914fc668c802
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.
src/timezone/localtime.c