* lib/mktime.c (__mktime_internal): Normalize tp->tm_isdst value.
Reported by Michael Ringe <Michael.Ringe@gmx.de> in
<http://sourceware.org/bugzilla/show_bug.cgi?id=6723>.
2008-07-23 Ulrich Drepper <drepper@redhat.com>
+ mktime.c: normalize tp->tm_isdst value to -1/0/1.
+ * lib/mktime.c (__mktime_internal): Normalize tp->tm_isdst value.
+ Reported by Michael Ringe <Michael.Ringe@gmx.de> in
+ <http://sourceware.org/bugzilla/show_bug.cgi?id=6723>.
+
* lib/canonicalize-lgpl.c (__realpath): Avoid buffer overflow after
readlink on platforms without PATH_MAX.
int mday = tp->tm_mday;
int mon = tp->tm_mon;
int year_requested = tp->tm_year;
- int isdst = tp->tm_isdst;
+ /* Normalize the value. */
+ int isdst = ((tp->tm_isdst >> (8 * sizeof (tp->tm_isdst) - 1))
+ | (tp->tm_isdst != 0));
/* 1 if the previous probe was DST. */
int dst2;