1 From 34be4dbf87fc3e474a842305394534216d428f5d Mon Sep 17 00:00:00 2001
2 From: Arnd Bergmann <arnd@arndb.de>
3 Date: Thu, 19 Oct 2017 16:47:48 +0200
4 Subject: isofs: fix timestamps beyond 2027
6 From: Arnd Bergmann <arnd@arndb.de>
8 commit 34be4dbf87fc3e474a842305394534216d428f5d upstream.
10 isofs uses a 'char' variable to load the number of years since
11 1900 for an inode timestamp. On architectures that use a signed
12 char type by default, this results in an invalid date for
15 This changes the function argument to a 'u8' array, which
16 is defined the same way on all architectures, and unambiguously
17 lets us use years until 2155.
19 This should be backported to all kernels that might still be
22 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
23 Signed-off-by: Jan Kara <jack@suse.cz>
24 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
27 fs/isofs/isofs.h | 2 +-
28 fs/isofs/rock.h | 2 +-
29 fs/isofs/util.c | 2 +-
30 3 files changed, 3 insertions(+), 3 deletions(-)
32 --- a/fs/isofs/isofs.h
33 +++ b/fs/isofs/isofs.h
34 @@ -103,7 +103,7 @@ static inline unsigned int isonum_733(ch
35 /* Ignore bigendian datum due to broken mastering programs */
36 return get_unaligned_le32(p);
38 -extern int iso_date(char *, int);
39 +extern int iso_date(u8 *, int);
41 struct inode; /* To make gcc happy */
45 @@ -65,7 +65,7 @@ struct RR_PL_s {
50 + __u8 time[7]; /* actually 6 unsigned, 1 signed */
51 } __attribute__ ((packed));
57 * to GMT. Thus we should always be correct.
60 -int iso_date(char * p, int flag)
61 +int iso_date(u8 *p, int flag)
63 int year, month, day, hour, minute, second, tz;