texlive[44649] Build/source/libs: graphite2 1.3.10

commits+kakuto at tug.org commits+kakuto at tug.org
Tue Jun 20 03:45:30 CEST 2017


Revision: 44649
          http://tug.org/svn/texlive?view=revision&revision=44649
Author:   kakuto
Date:     2017-06-20 03:45:29 +0200 (Tue, 20 Jun 2017)
Log Message:
-----------
graphite2 1.3.10

Modified Paths:
--------------
    trunk/Build/source/libs/README
    trunk/Build/source/libs/graphite2/ChangeLog
    trunk/Build/source/libs/graphite2/TLpatches/ChangeLog
    trunk/Build/source/libs/graphite2/TLpatches/TL-Changes
    trunk/Build/source/libs/graphite2/configure
    trunk/Build/source/libs/graphite2/graphite2-src/ChangeLog
    trunk/Build/source/libs/graphite2/graphite2-src/include/graphite2/Font.h
    trunk/Build/source/libs/graphite2/graphite2-src/src/CMakeLists.txt
    trunk/Build/source/libs/graphite2/graphite2-src/src/Collider.cpp
    trunk/Build/source/libs/graphite2/graphite2-src/src/Decompressor.cpp
    trunk/Build/source/libs/graphite2/graphite2-src/src/FeatureMap.cpp
    trunk/Build/source/libs/graphite2/graphite2-src/src/GlyphCache.cpp
    trunk/Build/source/libs/graphite2/graphite2-src/src/Pass.cpp
    trunk/Build/source/libs/graphite2/graphite2-src/src/Silf.cpp
    trunk/Build/source/libs/graphite2/graphite2-src/src/inc/Collider.h
    trunk/Build/source/libs/graphite2/graphite2-src/src/inc/UtfCodec.h
    trunk/Build/source/libs/graphite2/graphite2-src/src/inc/locale2lcid.h
    trunk/Build/source/libs/graphite2/version.ac

Modified: trunk/Build/source/libs/README
===================================================================
--- trunk/Build/source/libs/README	2017-06-20 01:32:24 UTC (rev 44648)
+++ trunk/Build/source/libs/README	2017-06-20 01:45:29 UTC (rev 44649)
@@ -21,7 +21,7 @@
 gmp 6.1.2 - checked 16dec16
   http://ftp.gnu.org/gnu/gmp/
 
-graphite2 1.3.9 - checked 13nov16
+graphite2 1.3.10 - checked 20jun17
   http://sourceforge.net/projects/silgraphite/files/graphite2/
 
 harfbuzz 1.4.6 - checked 24apr17

Modified: trunk/Build/source/libs/graphite2/ChangeLog
===================================================================
--- trunk/Build/source/libs/graphite2/ChangeLog	2017-06-20 01:32:24 UTC (rev 44648)
+++ trunk/Build/source/libs/graphite2/ChangeLog	2017-06-20 01:45:29 UTC (rev 44649)
@@ -1,3 +1,8 @@
+2017-06-20  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
+
+	Import graphite2-1.3.10.
+	* version.ac: Adjusted.
+
 2016-11-13  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
 
 	Import graphite2-1.3.9.

Modified: trunk/Build/source/libs/graphite2/TLpatches/ChangeLog
===================================================================
--- trunk/Build/source/libs/graphite2/TLpatches/ChangeLog	2017-06-20 01:32:24 UTC (rev 44648)
+++ trunk/Build/source/libs/graphite2/TLpatches/ChangeLog	2017-06-20 01:45:29 UTC (rev 44649)
@@ -1,3 +1,8 @@
+2017-06-20  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
+
+	Imported graphite2-1.3.10 source tree from:
+	  http://sourceforge.net/projects/silgraphite/files/graphite2/
+
 2016-11-13  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
 
 	Imported graphite2-1.3.9 source tree from:

Modified: trunk/Build/source/libs/graphite2/TLpatches/TL-Changes
===================================================================
--- trunk/Build/source/libs/graphite2/TLpatches/TL-Changes	2017-06-20 01:32:24 UTC (rev 44648)
+++ trunk/Build/source/libs/graphite2/TLpatches/TL-Changes	2017-06-20 01:45:29 UTC (rev 44649)
@@ -1,4 +1,4 @@
-Changes applied to the graphite2-1.3.9/ tree as obtained from:
+Changes applied to the graphite2-1.3.10/ tree as obtained from:
 	http://sourceforge.net/projects/silgraphite/files/graphite2/
 
 Removed unused dirs:

Modified: trunk/Build/source/libs/graphite2/configure
===================================================================
--- trunk/Build/source/libs/graphite2/configure	2017-06-20 01:32:24 UTC (rev 44648)
+++ trunk/Build/source/libs/graphite2/configure	2017-06-20 01:45:29 UTC (rev 44649)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for graphite2 (TeX Live) 1.3.9.
+# Generated by GNU Autoconf 2.69 for graphite2 (TeX Live) 1.3.10.
 #
 # Report bugs to <tex-k at tug.org>.
 #
@@ -579,8 +579,8 @@
 # Identity of this package.
 PACKAGE_NAME='graphite2 (TeX Live)'
 PACKAGE_TARNAME='graphite2--tex-live-'
-PACKAGE_VERSION='1.3.9'
-PACKAGE_STRING='graphite2 (TeX Live) 1.3.9'
+PACKAGE_VERSION='1.3.10'
+PACKAGE_STRING='graphite2 (TeX Live) 1.3.10'
 PACKAGE_BUGREPORT='tex-k at tug.org'
 PACKAGE_URL=''
 
@@ -1254,7 +1254,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures graphite2 (TeX Live) 1.3.9 to adapt to many kinds of systems.
+\`configure' configures graphite2 (TeX Live) 1.3.10 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1321,7 +1321,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of graphite2 (TeX Live) 1.3.9:";;
+     short | recursive ) echo "Configuration of graphite2 (TeX Live) 1.3.10:";;
    esac
   cat <<\_ACEOF
 
@@ -1419,7 +1419,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-graphite2 (TeX Live) configure 1.3.9
+graphite2 (TeX Live) configure 1.3.10
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1558,7 +1558,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by graphite2 (TeX Live) $as_me 1.3.9, which was
+It was created by graphite2 (TeX Live) $as_me 1.3.10, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3481,7 +3481,7 @@
 
 # Define the identity of the package.
  PACKAGE='graphite2--tex-live-'
- VERSION='1.3.9'
+ VERSION='1.3.10'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -5577,7 +5577,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by graphite2 (TeX Live) $as_me 1.3.9, which was
+This file was extended by graphite2 (TeX Live) $as_me 1.3.10, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -5643,7 +5643,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-graphite2 (TeX Live) config.status 1.3.9
+graphite2 (TeX Live) config.status 1.3.10
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: trunk/Build/source/libs/graphite2/graphite2-src/ChangeLog
===================================================================
--- trunk/Build/source/libs/graphite2/graphite2-src/ChangeLog	2017-06-20 01:32:24 UTC (rev 44648)
+++ trunk/Build/source/libs/graphite2/graphite2-src/ChangeLog	2017-06-20 01:45:29 UTC (rev 44649)
@@ -1,3 +1,7 @@
+1.3.10
+    . Address floating point build parameters to give consistent positioning results across platforms
+    . Various bug fixes
+
 1.3.9
     . Add Collision COLL_ISSPACE to allow for visible spaces in collision avoidance
     . Add segment and pass direction information to tracing output

Modified: trunk/Build/source/libs/graphite2/graphite2-src/include/graphite2/Font.h
===================================================================
--- trunk/Build/source/libs/graphite2/graphite2-src/include/graphite2/Font.h	2017-06-20 01:32:24 UTC (rev 44648)
+++ trunk/Build/source/libs/graphite2/graphite2-src/include/graphite2/Font.h	2017-06-20 01:45:29 UTC (rev 44649)
@@ -30,7 +30,7 @@
 
 #define GR2_VERSION_MAJOR   1
 #define GR2_VERSION_MINOR   3
-#define GR2_VERSION_BUGFIX  9
+#define GR2_VERSION_BUGFIX  10
 
 #ifdef __cplusplus
 extern "C"

Modified: trunk/Build/source/libs/graphite2/graphite2-src/src/CMakeLists.txt
===================================================================
--- trunk/Build/source/libs/graphite2/graphite2-src/src/CMakeLists.txt	2017-06-20 01:32:24 UTC (rev 44648)
+++ trunk/Build/source/libs/graphite2/graphite2-src/src/CMakeLists.txt	2017-06-20 01:45:29 UTC (rev 44649)
@@ -111,6 +111,9 @@
         COMPILE_FLAGS   "-Wall -Wextra -Wno-unknown-pragmas -Wendif-labels -Wshadow -Wctor-dtor-privacy -Wnon-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -fno-stack-protector"
         LINK_FLAGS      "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}" 
         LINKER_LANGUAGE C)
+    if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86|i.86")
+        add_definitions(-mfpmath=sse -msse2)
+    endif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86|i.86")
     if (CMAKE_COMPILER_IS_GNUCXX)
         add_definitions(-Wdouble-promotion)
     endif (CMAKE_COMPILER_IS_GNUCXX)
@@ -135,7 +138,7 @@
 
 if  (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
     set_target_properties(graphite2 PROPERTIES 
-        COMPILE_FLAGS   "-Wall -Wextra -Wno-unknown-pragmas -Wimplicit-fallthrough -Wendif-labels -Wshadow -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -fno-stack-protector"
+        COMPILE_FLAGS   "-Wall -Wextra -Wno-unknown-pragmas -Wimplicit-fallthrough -Wendif-labels -Wshadow -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -fno-stack-protector -mfpmath=sse -msse2"
         LINK_FLAGS      "-nodefaultlibs" 
         LINKER_LANGUAGE C)
     target_link_libraries(graphite2 c)

Modified: trunk/Build/source/libs/graphite2/graphite2-src/src/Collider.cpp
===================================================================
--- trunk/Build/source/libs/graphite2/graphite2-src/src/Collider.cpp	2017-06-20 01:32:24 UTC (rev 44648)
+++ trunk/Build/source/libs/graphite2/graphite2-src/src/Collider.cpp	2017-06-20 01:45:29 UTC (rev 44649)
@@ -262,7 +262,7 @@
 // Adjust the movement limits for the target to avoid having it collide
 // with the given neighbor slot. Also determine if there is in fact a collision
 // between the target and the given slot.
-bool ShiftCollider::mergeSlot(Segment *seg, Slot *slot, const Position &currShift,
+bool ShiftCollider::mergeSlot(Segment *seg, Slot *slot, const SlotCollision *cslot, const Position &currShift,
 		bool isAfter,  // slot is logically after _target
 		bool sameCluster, bool &hasCol, bool isExclusion,
         GR_MAYBE_UNUSED json * const dbgout )
@@ -282,7 +282,7 @@
         return false;
     const BBox &bb = gc.getBoundingBBox(gid);
 
-    SlotCollision * cslot = seg->collisionInfo(slot);
+    // SlotCollision * cslot = seg->collisionInfo(slot);
     int orderFlags = 0;
     bool sameClass = _seqProxClass == 0 && cslot->seqClass() == _seqClass;
     if (sameCluster && _seqClass 
@@ -561,7 +561,8 @@
         exclSlot->setGlyph(seg, cslot->exclGlyph());
         Position exclOrigin(slot->origin() + cslot->exclOffset());
         exclSlot->origin(exclOrigin);
-        res &= mergeSlot(seg, exclSlot, currShift, isAfter, sameCluster, isCol, true, dbgout );
+        SlotCollision exclInfo(seg, exclSlot);
+        res &= mergeSlot(seg, exclSlot, &exclInfo, currShift, isAfter, sameCluster, isCol, true, dbgout );
         seg->freeSlot(exclSlot);
     }
     hasCol |= isCol;

Modified: trunk/Build/source/libs/graphite2/graphite2-src/src/Decompressor.cpp
===================================================================
--- trunk/Build/source/libs/graphite2/graphite2-src/src/Decompressor.cpp	2017-06-20 01:32:24 UTC (rev 44648)
+++ trunk/Build/source/libs/graphite2/graphite2-src/src/Decompressor.cpp	2017-06-20 01:45:29 UTC (rev 44649)
@@ -51,7 +51,7 @@
     literal = src;
     src += literal_len;
     
-    if (src > end - 2)
+    if (src > end - 2 || src < literal)
         return false;
     
     match_dist  = *src++;
@@ -85,7 +85,7 @@
         {
             // Copy in literal. At this point the last full sequence must be at
             // least MINMATCH + 5 from the end of the output buffer.
-            if (dst + align(literal_len) > dst_end - (MINMATCH+5))
+            if (align(literal_len) > unsigned(dst_end - dst - (MINMATCH+5)) || dst_end - dst < MINMATCH + 5)
                 return -1;
             dst = overrun_copy(dst, literal, literal_len);
         }
@@ -94,7 +94,9 @@
         //  decoded output.
         u8 const * const pcpy = dst - match_dist;
         if (pcpy < static_cast<u8*>(out)
-                  || dst + match_len + MINMATCH > dst_end - 5)
+                  || pcpy >= dst
+                  || match_len > unsigned(dst_end - dst - (MINMATCH+5))
+                  || dst_end - dst < MINMATCH + 5)
             return -1;
         if (dst > pcpy+sizeof(unsigned long) 
             && dst + align(match_len + MINMATCH) <= dst_end)
@@ -103,8 +105,8 @@
             dst = safe_copy(dst, pcpy, match_len + MINMATCH);
     }
     
-    if (literal + literal_len > src_end
-              || dst + literal_len > dst_end)
+    if (literal_len > src_end - literal
+              || literal_len > dst_end - dst)
         return -1;
     dst = fast_copy(dst, literal, literal_len);
     

Modified: trunk/Build/source/libs/graphite2/graphite2-src/src/FeatureMap.cpp
===================================================================
--- trunk/Build/source/libs/graphite2/graphite2-src/src/FeatureMap.cpp	2017-06-20 01:32:24 UTC (rev 44648)
+++ trunk/Build/source/libs/graphite2/graphite2-src/src/FeatureMap.cpp	2017-06-20 01:45:29 UTC (rev 44649)
@@ -275,7 +275,8 @@
     else
       if (pDest.m_pMap!=&m_pFace->theSill().theFeatureMap())
         return false;       //incompatible
-    pDest.reserve(m_index);
+    if (m_index >= pDest.size())
+        pDest.resize(m_index+1);
     pDest[m_index] &= ~m_mask;
     pDest[m_index] |= (uint32(val) << m_bits);
     return true;

Modified: trunk/Build/source/libs/graphite2/graphite2-src/src/GlyphCache.cpp
===================================================================
--- trunk/Build/source/libs/graphite2/graphite2-src/src/GlyphCache.cpp	2017-06-20 01:32:24 UTC (rev 44648)
+++ trunk/Build/source/libs/graphite2/graphite2-src/src/GlyphCache.cpp	2017-06-20 01:45:29 UTC (rev 44649)
@@ -380,6 +380,8 @@
         be::skip<uint16>(gloc,2);
         if (_long_fmt)
         {
+            if (8 + glyphid * sizeof(uint32) > m_pGloc.size())
+                return 0;
             be::skip<uint32>(gloc, glyphid);
             glocs = be::read<uint32>(gloc);
             gloce = be::peek<uint32>(gloc);
@@ -386,6 +388,8 @@
         }
         else
         {
+            if (8 + glyphid * sizeof(uint16) > m_pGloc.size())
+                return 0;
             be::skip<uint16>(gloc, glyphid);
             glocs = be::read<uint16>(gloc);
             gloce = be::peek<uint16>(gloc);

Modified: trunk/Build/source/libs/graphite2/graphite2-src/src/Pass.cpp
===================================================================
--- trunk/Build/source/libs/graphite2/graphite2-src/src/Pass.cpp	2017-06-20 01:32:24 UTC (rev 44648)
+++ trunk/Build/source/libs/graphite2/graphite2-src/src/Pass.cpp	2017-06-20 01:45:29 UTC (rev 44649)
@@ -171,7 +171,7 @@
     const uint16 * const o_actions = reinterpret_cast<const uint16 *>(p);
     be::skip<uint16>(p, m_numRules + 1);
     const byte * const states = p;
-    if (e.test(p + 2u*m_numTransition*m_numColumns >= pass_end, E_BADPASSLENGTH)) return face.error(e);
+    if (e.test(2u*m_numTransition*m_numColumns >= (unsigned)(pass_end - p), E_BADPASSLENGTH)) return face.error(e);
     be::skip<int16>(p, m_numTransition*m_numColumns);
     be::skip<uint8>(p);
     if (e.test(p != pcCode, E_BADPASSCCODEPTR)) return face.error(e);
@@ -192,7 +192,7 @@
         m_cPConstraint = vm::Machine::Code(true, pcCode, pcCode + pass_constraint_len, 
                                   precontext[0], be::peek<uint16>(sort_keys), *m_silf, face, PASS_TYPE_UNKNOWN);
         if (e.test(!m_cPConstraint, E_OUTOFMEM)
-                || e.test(!m_cPConstraint, m_cPConstraint.status() + E_CODEFAILURE))
+                || e.test(m_cPConstraint.status() != Code::loaded, m_cPConstraint.status() + E_CODEFAILURE))
             return face.error(e);
         face.error_context(face.error_context() - 1);
     }
@@ -974,7 +974,7 @@
                             || !(cNbor->flags() & SlotCollision::COLL_FIX)     // merge in immovable stuff
                             || ((cNbor->flags() & SlotCollision::COLL_KERN) && !sameCluster)     // ignore other kernable clusters
                             || (cNbor->flags() & SlotCollision::COLL_ISCOL))   // test against other collided glyphs
-                      && !coll.mergeSlot(seg, nbor, cNbor->shift(), !ignoreForKern, sameCluster, collides, false, dbgout))
+                      && !coll.mergeSlot(seg, nbor, cNbor, cNbor->shift(), !ignoreForKern, sameCluster, collides, false, dbgout))
             return false;
         else if (nbor == slotFix)
             // Switching sides of this glyph - if we were ignoring kernable stuff before, don't anymore.

Modified: trunk/Build/source/libs/graphite2/graphite2-src/src/Silf.cpp
===================================================================
--- trunk/Build/source/libs/graphite2/graphite2-src/src/Silf.cpp	2017-06-20 01:32:24 UTC (rev 44648)
+++ trunk/Build/source/libs/graphite2/graphite2-src/src/Silf.cpp	2017-06-20 01:45:29 UTC (rev 44649)
@@ -155,8 +155,8 @@
     be::skip<uint32>(p, be::read<uint8>(p));    // don't use scriptTag array.
     if (e.test(p + sizeof(uint16) + sizeof(uint32) >= silf_end, E_BADSCRIPTTAGS)) { releaseBuffers(); return face.error(e); }
     m_gEndLine  = be::read<uint16>(p);          // lbGID
-    const byte * o_passes = p,
-               * const passes_start = silf_start + be::read<uint32>(p);
+    const byte * o_passes = p;
+    uint32 passes_start = be::read<uint32>(p);
 
     const size_t num_attrs = face.glyphs().numAttrs();
     if (e.test(m_aPseudo   >= num_attrs, E_BADAPSEUDO)
@@ -164,7 +164,7 @@
         || e.test(m_aBidi  >= num_attrs, E_BADABIDI)
         || e.test(m_aMirror>= num_attrs, E_BADAMIRROR)
         || e.test(m_aCollision && m_aCollision >= num_attrs - 5, E_BADACOLLISION)
-        || e.test(m_numPasses > 128, E_BADNUMPASSES) || e.test(passes_start >= silf_end, E_BADPASSESSTART)
+        || e.test(m_numPasses > 128, E_BADNUMPASSES) || e.test(passes_start >= lSilf, E_BADPASSESSTART)
         || e.test(m_pPass < m_sPass, E_BADPASSBOUND) || e.test(m_pPass > m_numPasses, E_BADPPASS) || e.test(m_sPass > m_numPasses, E_BADSPASS)
         || e.test(m_jPass < m_pPass, E_BADJPASSBOUND) || e.test(m_jPass > m_numPasses, E_BADJPASS)
         || e.test((m_bPass != 0xFF && (m_bPass < m_jPass || m_bPass > m_numPasses)), E_BADBPASS)
@@ -174,11 +174,11 @@
         return face.error(e);
     }
     be::skip<uint32>(p, m_numPasses);
-    if (e.test(p + sizeof(uint16) >= passes_start, E_BADPASSESSTART)) { releaseBuffers(); return face.error(e); }
+    if (e.test(unsigned(p - silf_start) + sizeof(uint16) >= passes_start, E_BADPASSESSTART)) { releaseBuffers(); return face.error(e); }
     m_numPseudo = be::read<uint16>(p);
     be::skip<uint16>(p, 3); // searchPseudo, pseudoSelector, pseudoShift
     m_pseudos = new Pseudo[m_numPseudo];
-    if (e.test(p + m_numPseudo*(sizeof(uint32) + sizeof(uint16)) >= passes_start, E_BADNUMPSEUDO)
+    if (e.test(unsigned(p - silf_start) + m_numPseudo*(sizeof(uint32) + sizeof(uint16)) >= passes_start, E_BADNUMPSEUDO)
         || e.test(!m_pseudos, E_OUTOFMEM))
     {
         releaseBuffers(); return face.error(e);
@@ -189,20 +189,20 @@
         m_pseudos[i].gid = be::read<uint16>(p);
     }
 
-    const size_t clen = readClassMap(p, passes_start - p, version, e);
+    const size_t clen = readClassMap(p, passes_start + silf_start - p, version, e);
     m_passes = new Pass[m_numPasses];
-    if (e || e.test(p + clen > passes_start, E_BADPASSESSTART)
+    if (e || e.test(clen > unsigned(passes_start + silf_start - p), E_BADPASSESSTART)
           || e.test(!m_passes, E_OUTOFMEM))
     { releaseBuffers(); return face.error(e); }
 
     for (size_t i = 0; i < m_numPasses; ++i)
     {
-        const byte * const pass_start = silf_start + be::read<uint32>(o_passes),
-                   * const pass_end = silf_start + be::peek<uint32>(o_passes);
+        uint32 pass_start = be::read<uint32>(o_passes);
+        uint32 pass_end = be::peek<uint32>(o_passes);
         face.error_context((face.error_context() & 0xFF00) + EC_ASILF + (i << 16));
         if (e.test(pass_start > pass_end, E_BADPASSSTART) 
                 || e.test(pass_start < passes_start, E_BADPASSSTART)
-                || e.test(pass_end > silf_end, E_BADPASSEND)) {
+                || e.test(pass_end > lSilf, E_BADPASSEND)) {
             releaseBuffers(); return face.error(e);
         }
 
@@ -213,7 +213,7 @@
         else pt = PASS_TYPE_LINEBREAK;
 
         m_passes[i].init(this);
-        if (!m_passes[i].readPass(pass_start, pass_end - pass_start, pass_start - silf_start, face, pt,
+        if (!m_passes[i].readPass(silf_start + pass_start, pass_end - pass_start, pass_start, face, pt,
             version, e))
         {
             releaseBuffers();
@@ -293,7 +293,8 @@
         if (e.test(*o + 4 > max_off, E_HIGHCLASSOFFSET)                        // LookupClass doesn't stretch over max_off
          || e.test(lookup[0] == 0                                                   // A LookupClass with no looks is a suspicious thing ...
                     || lookup[0] * 2 + *o + 4 > max_off                             // numIDs lookup pairs fits within (start of LookupClass' lookups array, max_off]
-                    || lookup[3] + lookup[1] != lookup[0], E_BADCLASSLOOKUPINFO))   // rangeShift:   numIDs  - searchRange
+                    || lookup[3] + lookup[1] != lookup[0], E_BADCLASSLOOKUPINFO)    // rangeShift:   numIDs  - searchRange
+         || e.test(((o[1] - *o) & 1) != 0, ERROROFFSET))                         // glyphs are in pairs so difference must be even.
             return ERROROFFSET;
     }
 

Modified: trunk/Build/source/libs/graphite2/graphite2-src/src/inc/Collider.h
===================================================================
--- trunk/Build/source/libs/graphite2/graphite2-src/src/inc/Collider.h	2017-06-20 01:32:24 UTC (rev 44648)
+++ trunk/Build/source/libs/graphite2/graphite2-src/src/inc/Collider.h	2017-06-20 01:45:29 UTC (rev 44649)
@@ -133,7 +133,7 @@
     bool initSlot(Segment *seg, Slot *aSlot, const Rect &constraint,
                 float margin, float marginMin, const Position &currShift,
                 const Position &currOffset, int dir, GR_MAYBE_UNUSED json * const dbgout);
-    bool mergeSlot(Segment *seg, Slot *slot, const Position &currShift, bool isAfter, 
+    bool mergeSlot(Segment *seg, Slot *slot, const SlotCollision *cinfo, const Position &currShift, bool isAfter, 
                 bool sameCluster, bool &hasCol, bool isExclusion, GR_MAYBE_UNUSED json * const dbgout);
     Position resolve(Segment *seg, bool &isCol, GR_MAYBE_UNUSED json * const dbgout);
     void addBox_slope(bool isx, const Rect &box, const BBox &bb, const SlantBox &sb, const Position &org, float weight, float m, bool minright, int mode);

Modified: trunk/Build/source/libs/graphite2/graphite2-src/src/inc/UtfCodec.h
===================================================================
--- trunk/Build/source/libs/graphite2/graphite2-src/src/inc/UtfCodec.h	2017-06-20 01:32:24 UTC (rev 44648)
+++ trunk/Build/source/libs/graphite2/graphite2-src/src/inc/UtfCodec.h	2017-06-20 01:45:29 UTC (rev 44649)
@@ -124,8 +124,8 @@
 private:
     static const int8 sz_lut[16];
     static const byte mask_lut[5];
+    static const uchar_t    limit = 0x110000;
 
-
 public:
     typedef uint8   codeunit_t;
 
@@ -157,7 +157,7 @@
             case 0:     l = -1; return 0xFFFD;
         }
 
-        if (l != seq_sz || toolong)
+        if (l != seq_sz || toolong  || u >= limit)
         {
             l = -l;
             return 0xFFFD;

Modified: trunk/Build/source/libs/graphite2/graphite2-src/src/inc/locale2lcid.h
===================================================================
--- trunk/Build/source/libs/graphite2/graphite2-src/src/inc/locale2lcid.h	2017-06-20 01:32:24 UTC (rev 44648)
+++ trunk/Build/source/libs/graphite2/graphite2-src/src/inc/locale2lcid.h	2017-06-20 01:45:29 UTC (rev 44649)
@@ -36,8 +36,8 @@
 struct IsoLangEntry
 {
     unsigned short mnLang;
-    const char maLangStr[4];
-    const char maCountry[3];
+    char maLangStr[4];
+    char maCountry[3];
 };
 
 // Windows Language ID, Locale ISO-639 language, country code as used in

Modified: trunk/Build/source/libs/graphite2/version.ac
===================================================================
--- trunk/Build/source/libs/graphite2/version.ac	2017-06-20 01:32:24 UTC (rev 44648)
+++ trunk/Build/source/libs/graphite2/version.ac	2017-06-20 01:45:29 UTC (rev 44649)
@@ -8,4 +8,4 @@
 dnl --------------------------------------------------------
 dnl
 dnl  m4-include this file to define the current graphite2 version
-m4_define([graphite2_version], [1.3.9])
+m4_define([graphite2_version], [1.3.10])



More information about the tex-live-commits mailing list