Codebase list libhdate / 7532d42
Patch time_t: fixes a size issue on x32 (Closes: #719808). Tzafrir Cohen 10 years ago
3 changed file(s) with 24 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
00 libhdate (1.6-2) UNRELEASED; urgency=low
11
22 * Patch fix_3: fix an endless loop with hcal -3 (Closes: #692039).
3 * Patch time_t: fixes a size issue on x32 (Closes: #719808).
34
45 -- Tzafrir Cohen <tzafrir@debian.org> Thu, 01 Nov 2012 16:53:34 +0200
56
11 ld-as-needed.patch
22 manpage.patch
33 fix_3
4 time_t.patch
0 Author: Adam Borowski <kilobyte@angband.pl>
1 Description: fix sizes issues manifested in x32
2 Bug-Debian: http://bugs.debian.org/719808
3
4 libhdate calls localtime(long), when its interface requires time_t.
5
6 If sizeof(long) == sizeof(time_t), all is ok.
7 If sizeof(long) > sizeof(time_t), it will work on little-endian, use some
8 uninitialized memory on big-endian.
9 If sizeof(long) < sizeof(time_t), it will trample nearby memory.
10
11 --- a/src/hdate_julian.c
12 +++ b/src/hdate_julian.c
13 @@ -367,7 +367,7 @@ hdate_set_gdate (hdate_struct * h, int d
14 if ((d == 0) || (m == 0))
15 {
16 struct tm *tm;
17 - long t;
18 + time_t t;
19 /* FIXME: day start at 6:00 or 12:00 like in Gregorian cal. ? */
20 t = time (0);
21 tm = localtime (&t);