diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-05-07 11:34:31 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-05-07 11:34:41 -0400 |
commit | 5042e9492b17f6f4029bb1aca7c1c0b8247c8c95 (patch) | |
tree | 35df500c0a7bb20d794939b855a53a16a63e8773 /src | |
parent | ef42c1103708cbbb77fff674f339d452a13aac14 (diff) | |
download | postgresql-5042e9492b17f6f4029bb1aca7c1c0b8247c8c95.tar.gz postgresql-5042e9492b17f6f4029bb1aca7c1c0b8247c8c95.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/timezone/pgtz.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/timezone/pgtz.c b/src/timezone/pgtz.c index 9356f2592d0..b2a4a2d3561 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'; } /* |