mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2025-11-20 17:09:34 +00:00
zdump: don't use uninitialized storage
* zdump.c (main): Avoid use of uninitalized locals in rare cases. * NEWS: Mention this.
This commit is contained in:
4
NEWS
4
NEWS
@ -41,8 +41,8 @@ Unreleased, experimental changes
|
||||
|
||||
Changes affecting code
|
||||
|
||||
Some crashes have been fixed when the tz library is given a
|
||||
compiled time zone file containing invalid or outlandish data.
|
||||
Some crashes have been fixed when zdump or the tz library is given
|
||||
invalid or outlandish input.
|
||||
|
||||
The tz library no longer mishandles leap seconds on platforms with
|
||||
unsigned time_t in time zones that lack ordinary transitions after 1970.
|
||||
|
||||
4
zdump.c
4
zdump.c
@ -420,8 +420,11 @@ _("%s: usage: %s [--version] [--help] [-{vV}] [-{ct} [lo,]hi] zonename ...\n"
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
/* These are static so that they're initially zero. */
|
||||
static char * abbrev;
|
||||
static size_t abbrevsize;
|
||||
static struct tm newtm;
|
||||
|
||||
register int i;
|
||||
register bool vflag;
|
||||
register bool Vflag;
|
||||
@ -433,7 +436,6 @@ main(int argc, char *argv[])
|
||||
time_t t;
|
||||
time_t newt;
|
||||
struct tm tm;
|
||||
struct tm newtm;
|
||||
register struct tm * tmp;
|
||||
register struct tm * newtmp;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user