[PATCH] cpio: Avoid int overflow after year 2038
bernhardout at lsmod.de
bernhardout at lsmod.de
Wed Jun 3 17:22:42 UTC 2026
From: "Bernhard M. Wiedemann" <bwiedemann at suse.de>
See https://en.wikipedia.org/wiki/Year_2038_problem
This patch was done while reviewing potential year-2038 issues in openSUSE.
Signed-off-by: Bernhard M. Wiedemann <bwiedemann at suse.de>
---
archival/libarchive/get_header_cpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/archival/libarchive/get_header_cpio.c b/archival/libarchive/get_header_cpio.c
index 9ad0557..b6ffe3d 100644
--- a/archival/libarchive/get_header_cpio.c
+++ b/archival/libarchive/get_header_cpio.c
@@ -11,7 +11,7 @@ typedef struct hardlinks_t {
struct hardlinks_t *next;
int inode; /* TODO: must match maj/min too! */
int mode ;
- int mtime; /* These three are useful only in corner case */
+ time_t mtime; /* These three are useful only in corner case */
int uid ; /* of hardlinks with zero size body */
int gid ;
char name[1];
--
2.54.0
More information about the busybox
mailing list