Skip to content

Commit 5788a56

Browse files
committed
Restore fullname[] contents before falling through in pg_open_tzfile().
Fix oversight in commit af2c5aa: 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
1 parent 628462b commit 5788a56

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/timezone/pgtz.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ pg_open_tzfile(const char *name, char *canonname)
105105
if (result >= 0)
106106
return result;
107107
/* If that didn't work, fall through to do it the hard way */
108+
fullname[fullnamelen] = '\0';
108109
}
109110

110111
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy