texlive[46118] Build/source/texk/web2c/xetexdir:
commits+kakuto at tug.org
commits+kakuto at tug.org
Fri Dec 22 05:45:36 CET 2017
Revision: 46118
http://tug.org/svn/texlive?view=revision&revision=46118
Author: kakuto
Date: 2017-12-22 05:45:35 +0100 (Fri, 22 Dec 2017)
Log Message:
-----------
xetexdir/image/jpegimage.c: if j_info->xdpi and j_info->ydpi are not determined, they are assumed to be 72.0 to avoid division by 0.
Modified Paths:
--------------
trunk/Build/source/texk/web2c/xetexdir/ChangeLog
trunk/Build/source/texk/web2c/xetexdir/image/jpegimage.c
Modified: trunk/Build/source/texk/web2c/xetexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/xetexdir/ChangeLog 2017-12-22 01:22:13 UTC (rev 46117)
+++ trunk/Build/source/texk/web2c/xetexdir/ChangeLog 2017-12-22 04:45:35 UTC (rev 46118)
@@ -1,3 +1,9 @@
+2017-12-22 Akira Kakuto <kakuto at fuk.kindai.ac.jp>
+
+ * image/jpegimage.c: If j_info->xdpi and j_info->ydpi are not
+ determined in some JPEG format, they are assumed to be 72.0
+ in order to avoid division by zero.
+
2017-11-07 Jonathan Kew <jfkthame at gmail.com>
* XeTeX_ext.c: Guard against out-of-range result from UTF-8
Modified: trunk/Build/source/texk/web2c/xetexdir/image/jpegimage.c
===================================================================
--- trunk/Build/source/texk/web2c/xetexdir/image/jpegimage.c 2017-12-22 01:22:13 UTC (rev 46117)
+++ trunk/Build/source/texk/web2c/xetexdir/image/jpegimage.c 2017-12-22 04:45:35 UTC (rev 46118)
@@ -1,6 +1,6 @@
/****************************************************************************\
Part of the XeTeX typesetting system
- Copyright (c) 1994-2009 by SIL International
+ Copyright (c) 1994-2017 by SIL International
SIL Author(s): Jonathan Kew
@@ -24,7 +24,7 @@
/* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
- Copyright (C) 2002-2015 by Jin-Hwan Cho and Shunsaku Hirata,
+ Copyright (C) 2002-2017 by Jin-Hwan Cho and Shunsaku Hirata,
the dvipdfmx project team.
Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
@@ -492,5 +492,13 @@
count++;
}
+/*
+ * If j_info->xdpi, and j_info->ydpi are not yet determined,
+ * they are assumed to be 72.0 to avoid division by zero.
+ */
+ if (j_info->xdpi < 0.1 && j_info->ydpi < 0.1) {
+ j_info->xdpi = j_info->ydpi = 72.0;
+ }
+
return (found_SOFn ? 0 : -1);
}
More information about the tex-live-commits
mailing list