Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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)