summaryrefslogtreecommitdiff
path: root/bin/pax/cpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/pax/cpio.c')
-rw-r--r--bin/pax/cpio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/pax/cpio.c b/bin/pax/cpio.c
index 9274d88809c..fa78ae2bf60 100644
--- a/bin/pax/cpio.c
+++ b/bin/pax/cpio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpio.c,v 1.31 2017/09/06 17:24:22 otto Exp $ */
+/* $OpenBSD: cpio.c,v 1.32 2017/09/12 17:11:11 otto Exp $ */
/* $NetBSD: cpio.c,v 1.5 1995/03/21 09:07:13 cgd Exp $ */
/*-
@@ -293,7 +293,7 @@ cpio_rd(ARCHD *arcn, char *buf)
OCT);
arcn->sb.st_rdev = (dev_t)asc_ul(hd->c_rdev, sizeof(hd->c_rdev), OCT);
val = asc_ull(hd->c_mtime, sizeof(hd->c_mtime), OCT);
- if ((time_t)val < 0 || (time_t)val != val)
+ if (val > MAX_TIME_T)
arcn->sb.st_mtime = INT_MAX; /* XXX 2038 */
else
arcn->sb.st_mtime = val;