postgres.git / summary / log / commit / refs
commit 38ed45c9156ac65ad35647e5c46acf2c5b03bdca
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sun May 07 15:34:31 2017 +0000
First released in: 10.0, 9.2.21, 9.3.17, 9.4.12, 9.5.7, 9.6.3
Restore fullname[] contents before falling through in pg_open_tzfile().
Fix oversight in commit af2c5aa88: if the shortcut open() doesn't work,
we need to reset fullname[] to be just the name of the toplevel tzdata
directory before we fall through into the pre-existing code. This failed
to be exposed in my (tgl's) testing because the fall-through path is
actually never taken under normal circumstances.
David Rowley, per report from Amit Kapila
Discussion: https://postgr.es/m/CAA4eK1LC7CaNhRAQ__C3ht1JVrPzaAXXhEJRnR5L6bfYHiLmWw@mail.gmail.com
src/timezone/pgtz.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/timezone/pgtz.c b/src/timezone/pgtz.c
index 4de78b4efe9..2f0344ce399 100644
--- a/src/timezone/pgtz.c
+++ b/src/timezone/pgtz.c
@@ -105,6 +105,7 @@ pg_open_tzfile(const char *name, char *canonname)
if (result >= 0)
return result;
/* If that didn't work, fall through to do it the hard way */
+ fullname[fullnamelen] = '\0';
}
/*
[parent: cdf5a004bb7c]