summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-05-06 23:34:23 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-05-06 23:34:23 +0000
commit5e7ae95ec8eb655217899da5a7704ebf1a0603fc (patch)
tree31774308adefbb9167736f6a6c64ebf4295bd315 /Build
parentf3600fcb108ab5e803544eadab8c3fa8eb9f75da (diff)
avoid to crash (w32 only)
git-svn-id: svn://tug.org/texlive/trunk@40924 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/dvipdfm-x/ChangeLog5
-rw-r--r--Build/source/texk/dvipdfm-x/pdffont.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog
index ab7dc976e24..61f92c33317 100644
--- a/Build/source/texk/dvipdfm-x/ChangeLog
+++ b/Build/source/texk/dvipdfm-x/ChangeLog
@@ -1,3 +1,8 @@
+2016-05-06 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * pdffont.c: Avoid to crash for too large a value of SOURCE_DATE_EPOCH.
+ (w32 only).
+
2016-05-04 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* pdfdoc.c, pdfencrypt.c, pdffont.c, pdfobj.h, xbb.c: Improve the
diff --git a/Build/source/texk/dvipdfm-x/pdffont.c b/Build/source/texk/dvipdfm-x/pdffont.c
index 7c8caca3886..b43709677bb 100644
--- a/Build/source/texk/dvipdfm-x/pdffont.c
+++ b/Build/source/texk/dvipdfm-x/pdffont.c
@@ -107,8 +107,13 @@ get_unique_time_if_given(void)
if (source_date_epoch) {
errno = 0;
epoch = strtoll(source_date_epoch, &endptr, 10);
- if (!(epoch < 0 || *endptr != '\0' || errno != 0))
+ if (!(epoch < 0 || *endptr != '\0' || errno != 0)) {
ret = (time_t) epoch;
+#if defined(_MSC_VER)
+ if (ret > 32535291599ULL)
+ ret = 32535291599ULL;
+#endif
+ }
}
return ret;
}