Hello community,

here is the log from the commit of package graphite2 for openSUSE:Factory 
checked in at 2016-03-07 13:36:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/graphite2 (Old)
 and      /work/SRC/openSUSE:Factory/.graphite2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "graphite2"

Changes:
--------
--- /work/SRC/openSUSE:Factory/graphite2/graphite2.changes      2016-02-23 
16:54:42.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.graphite2.new/graphite2.changes 2016-03-07 
13:36:46.000000000 +0100
@@ -1,0 +2,7 @@
+Mon Feb 29 19:32:53 UTC 2016 - [email protected]
+
+- Update to 1.3.6
+  * This fixes a number of security related bugs. There are no feature
+    improvements or bug fixes in this release.
+
+-------------------------------------------------------------------

Old:
----
  1.3.5.tar.gz

New:
----
  1.3.6.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ graphite2.spec ++++++
--- /var/tmp/diff_new_pack.EFiGYN/_old  2016-03-07 13:36:47.000000000 +0100
+++ /var/tmp/diff_new_pack.EFiGYN/_new  2016-03-07 13:36:47.000000000 +0100
@@ -18,7 +18,7 @@
 
 %define libname libgraphite2-3
 Name:           graphite2
-Version:        1.3.5
+Version:        1.3.6
 Release:        0
 Summary:        Font rendering capabilities for complex non-Roman writing 
systems
 License:        LGPL-2.1+ or GPL-2.0+ or MPL-1.1

++++++ 1.3.5.tar.gz -> 1.3.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/graphite-1.3.5/ChangeLog new/graphite-1.3.6/ChangeLog
--- old/graphite-1.3.5/ChangeLog        2016-01-15 05:17:18.000000000 +0100
+++ new/graphite-1.3.6/ChangeLog        2016-02-29 05:18:01.000000000 +0100
@@ -1,3 +1,6 @@
+1.3.6
+    . Bug fixes
+
 1.3.5
     . Bug fixes
         . Security bug fix
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/graphite-1.3.5/debian-src/changelog 
new/graphite-1.3.6/debian-src/changelog
--- old/graphite-1.3.5/debian-src/changelog     2016-01-15 05:17:18.000000000 
+0100
+++ new/graphite-1.3.6/debian-src/changelog     2016-02-29 05:18:01.000000000 
+0100
@@ -1,3 +1,9 @@
+graphite2 (1.3.6-1~palaso1) trusty; urgency=medium
+
+  * New bug fix release
+
+ -- Martin Hosken <[email protected]>  Mon, 29 Feb 2016 11:17:04 +0700
+
 graphite2 (1.3.5-1~palaso1) trusty; urgency=medium
 
   * New bug fix release
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/graphite-1.3.5/include/graphite2/Font.h 
new/graphite-1.3.6/include/graphite2/Font.h
--- old/graphite-1.3.5/include/graphite2/Font.h 2016-01-15 05:17:18.000000000 
+0100
+++ new/graphite-1.3.6/include/graphite2/Font.h 2016-02-29 05:18:01.000000000 
+0100
@@ -30,7 +30,7 @@
 
 #define GR2_VERSION_MAJOR   1
 #define GR2_VERSION_MINOR   3
-#define GR2_VERSION_BUGFIX  5
+#define GR2_VERSION_BUGFIX  6
 
 #ifdef __cplusplus
 extern "C"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/graphite-1.3.5/src/CmapCache.cpp 
new/graphite-1.3.6/src/CmapCache.cpp
--- old/graphite-1.3.5/src/CmapCache.cpp        2016-01-15 05:17:18.000000000 
+0100
+++ new/graphite-1.3.6/src/CmapCache.cpp        2016-02-29 05:18:01.000000000 
+0100
@@ -38,11 +38,11 @@
 {
     const void * stbl;
     if (!cmap.size()) return 0;
-    if (TtfUtil::CheckCmapSubtable4(stbl = TtfUtil::FindCmapSubtable(cmap, 3, 
1, cmap.size()), cmap.size())
-     || TtfUtil::CheckCmapSubtable4(stbl = TtfUtil::FindCmapSubtable(cmap, 0, 
3, cmap.size()), cmap.size())
-     || TtfUtil::CheckCmapSubtable4(stbl = TtfUtil::FindCmapSubtable(cmap, 0, 
2, cmap.size()), cmap.size())
-     || TtfUtil::CheckCmapSubtable4(stbl = TtfUtil::FindCmapSubtable(cmap, 0, 
1, cmap.size()), cmap.size())
-     || TtfUtil::CheckCmapSubtable4(stbl = TtfUtil::FindCmapSubtable(cmap, 0, 
0, cmap.size()), cmap.size()))
+    if (TtfUtil::CheckCmapSubtable4(stbl = TtfUtil::FindCmapSubtable(cmap, 3, 
1, cmap.size()), cmap + cmap.size())
+     || TtfUtil::CheckCmapSubtable4(stbl = TtfUtil::FindCmapSubtable(cmap, 0, 
3, cmap.size()), cmap + cmap.size())
+     || TtfUtil::CheckCmapSubtable4(stbl = TtfUtil::FindCmapSubtable(cmap, 0, 
2, cmap.size()), cmap + cmap.size())
+     || TtfUtil::CheckCmapSubtable4(stbl = TtfUtil::FindCmapSubtable(cmap, 0, 
1, cmap.size()), cmap + cmap.size())
+     || TtfUtil::CheckCmapSubtable4(stbl = TtfUtil::FindCmapSubtable(cmap, 0, 
0, cmap.size()), cmap + cmap.size()))
         return stbl;
     return 0;
 }
@@ -51,8 +51,8 @@
 {
     const void * stbl;
     if (!cmap.size()) return 0;
-    if (TtfUtil::CheckCmapSubtable12(stbl = TtfUtil::FindCmapSubtable(cmap, 3, 
10, cmap.size()), cmap.size())
-     || TtfUtil::CheckCmapSubtable12(stbl = TtfUtil::FindCmapSubtable(cmap, 0, 
4, cmap.size()), cmap.size()))
+    if (TtfUtil::CheckCmapSubtable12(stbl = TtfUtil::FindCmapSubtable(cmap, 3, 
10, cmap.size()), cmap + cmap.size())
+     || TtfUtil::CheckCmapSubtable12(stbl = TtfUtil::FindCmapSubtable(cmap, 0, 
4, cmap.size()), cmap + cmap.size()))
         return stbl;
     return 0;
 }
@@ -64,7 +64,7 @@
     int rangeKey = 0;
     uint32          codePoint = NextCodePoint(cst, 0, &rangeKey),
                     prevCodePoint = 0;
-    while (codePoint != limit)
+    while (codePoint < limit)
     {
         unsigned int block = codePoint >> 8;
         if (!blocks[block])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/graphite-1.3.5/src/Code.cpp 
new/graphite-1.3.6/src/Code.cpp
--- old/graphite-1.3.5/src/Code.cpp     2016-01-15 05:17:18.000000000 +0100
+++ new/graphite-1.3.6/src/Code.cpp     2016-02-29 05:18:01.000000000 +0100
@@ -84,8 +84,9 @@
     struct limits;
     struct analysis
     {
+        static const int NUMCONTEXTS = 256;
         uint8     slotref;
-        context   contexts[256];
+        context   contexts[NUMCONTEXTS];
         byte      max_ref;
         
         analysis() : slotref(0), max_ref(0) {};
@@ -368,6 +369,8 @@
             if (--_stack_depth < 0)
                 failure(underfull_stack);
             valid_upto(gr_slatMax, bc[0]);
+            if (attrCode(bc[0]) == gr_slatUserDefn)     // use IATTR for user 
attributes
+                failure(out_of_range_data);
             test_context();
             break;
         case IATTR_SET_SLOT :
@@ -381,6 +384,8 @@
             ++_stack_depth;
             valid_upto(gr_slatMax, bc[0]);
             valid_upto(_rule_length, _pre_context + int8(bc[1]));
+            if (attrCode(bc[0]) == gr_slatUserDefn)     // use IATTR for user 
attributes
+                failure(out_of_range_data);
             break;
         case PUSH_GLYPH_ATTR_OBS :
             ++_stack_depth;
@@ -661,14 +666,14 @@
 
 bool Machine::Code::decoder::valid_upto(const uint16 limit, const uint16 x) 
const throw()
 {
-    const bool t = x < limit;
+    const bool t = (limit != 0) && (x < limit);
     if (!t) failure(out_of_range_data);
     return t;
 }
 
 bool Machine::Code::decoder::test_context() const throw()
 {
-    if (_pre_context >= _rule_length)
+    if (_pre_context >= _rule_length || _analysis.slotref >= 
analysis::NUMCONTEXTS - 1)
     {
         failure(out_of_range_data);
         return false;
@@ -686,7 +691,7 @@
 inline
 void Machine::Code::decoder::analysis::set_ref(int index, bool incinsert) 
throw() {
     if (incinsert && contexts[slotref].flags.inserted) --index;
-    if (index + slotref < 0) return;
+    if (index + slotref < 0 || index + slotref >= NUMCONTEXTS) return;
     contexts[index + slotref].flags.referenced = true;
     if ((index > 0 || !contexts[index + slotref].flags.inserted) && index + 
slotref > max_ref) max_ref = index + slotref;
 }
@@ -695,7 +700,7 @@
 inline
 void Machine::Code::decoder::analysis::set_noref(int index) throw() {
     if (contexts[slotref].flags.inserted) --index;
-    if (index + slotref < 0) return;
+    if (index + slotref < 0 || index + slotref >= NUMCONTEXTS) return;
     if ((index > 0 || !contexts[index + slotref].flags.inserted) && index + 
slotref > max_ref) max_ref = index + slotref;
 }
 
@@ -703,7 +708,7 @@
 inline
 void Machine::Code::decoder::analysis::set_changed(int index) throw() {
     if (contexts[slotref].flags.inserted) --index;
-    if (index + slotref < 0) return;
+    if (index + slotref < 0 || index + slotref >= NUMCONTEXTS) return;
     contexts[index + slotref].flags.changed = true;
     if ((index > 0 || !contexts[index + slotref].flags.inserted) && index + 
slotref > max_ref) max_ref = index + slotref;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/graphite-1.3.5/src/Face.cpp 
new/graphite-1.3.6/src/Face.cpp
--- old/graphite-1.3.5/src/Face.cpp     2016-01-15 05:17:18.000000000 +0100
+++ new/graphite-1.3.6/src/Face.cpp     2016-02-29 05:18:01.000000000 +0100
@@ -238,7 +238,7 @@
         case kgmetAscent : return m_ascent;
         case kgmetDescent : return m_descent;
         default: 
-            if (gid > glyphs().numGlyphs()) return 0;
+            if (gid >= glyphs().numGlyphs()) return 0;
             return glyphs().glyph(gid)->getMetric(metric);
     }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/graphite-1.3.5/src/FileFace.cpp 
new/graphite-1.3.6/src/FileFace.cpp
--- old/graphite-1.3.5/src/FileFace.cpp 2016-01-15 05:17:18.000000000 +0100
+++ new/graphite-1.3.6/src/FileFace.cpp 2016-02-29 05:18:01.000000000 +0100
@@ -60,8 +60,12 @@
     if (!TtfUtil::GetTableDirInfo(_header_tbl, tbl_offset, tbl_len)) return;
     _table_dir = (TtfUtil::Sfnt::OffsetSubTable::Entry*)gralloc<char>(tbl_len);
     if (fseek(_file, tbl_offset, SEEK_SET)) return;
-    if (_table_dir)
-        if (fread(_table_dir, 1, tbl_len, _file) != tbl_len) return;
+    if (_table_dir && fread(_table_dir, 1, tbl_len, _file) != tbl_len)
+    {
+        free(_table_dir);
+        _table_dir = NULL;
+    }
+    return;
 }
 
 FileFace::~FileFace()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/graphite-1.3.5/src/GlyphCache.cpp 
new/graphite-1.3.6/src/GlyphCache.cpp
--- old/graphite-1.3.5/src/GlyphCache.cpp       2016-01-15 05:17:18.000000000 
+0100
+++ new/graphite-1.3.6/src/GlyphCache.cpp       2016-02-29 05:18:01.000000000 
+0100
@@ -265,7 +265,7 @@
     {
         if ((m_pGlat = Face::Table(face, Tag::Glat, 0x00030000)) == NULL
             || (m_pGloc = Face::Table(face, Tag::Gloc)) == NULL
-            || m_pGloc.size() < 6)
+            || m_pGloc.size() < 8)
         {
             _head = Face::Table();
             return;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/graphite-1.3.5/src/Pass.cpp 
new/graphite-1.3.6/src/Pass.cpp
--- old/graphite-1.3.5/src/Pass.cpp     2016-01-15 05:17:18.000000000 +0100
+++ new/graphite-1.3.6/src/Pass.cpp     2016-02-29 05:18:01.000000000 +0100
@@ -100,7 +100,9 @@
     if (e.test(pass_length < 40, E_BADPASSLENGTH)) return face.error(e); 
     // Read in basic values
     const byte flags = be::read<byte>(p);
-    if (e.test((flags & 0x1f) && pt < PASS_TYPE_POSITIONING, 
E_BADCOLLISIONPASS))
+    if (e.test((flags & 0x1f) && 
+            (pt < PASS_TYPE_POSITIONING || !m_silf->aCollision() || 
!face.glyphs().hasBoxes()),
+            E_BADCOLLISIONPASS))
         return face.error(e);
     m_numCollRuns = flags & 0x7;
     m_kernColls   = (flags >> 3) & 0x3;
@@ -236,7 +238,7 @@
     if (e.test(!(m_rules && m_codes && m_progs), E_OUTOFMEM)) return 
face.error(e);
 
     Rule * r = m_rules + m_numRules - 1;
-    for (size_t n = m_numRules; n; --n, --r, ac_end = ac_begin, rc_end = 
rc_begin)
+    for (size_t n = m_numRules; r >= m_rules; --n, --r, ac_end = ac_begin, 
rc_end = rc_begin)
     {
         face.error_context((face.error_context() & 0xFFFF00) + EC_ARULE + ((n 
- 1) << 24));
         r->preContext = *--precontext;
@@ -408,6 +410,7 @@
         do
         {
             findNDoRule(s, m, fsm);
+            if (m.status() != Machine::finished) return false;
             if (s && (s == m.slotMap().highwater() || m.slotMap().highpassed() 
|| --lc == 0)) {
                 if (!lc)
                     s = m.slotMap().highwater();
@@ -498,7 +501,12 @@
         // Search for the first rule which passes the constraint
         const RuleEntry *        r = fsm.rules.begin(),
                         * const re = fsm.rules.end();
-        while (r != re && !testConstraint(*r->rule, m)) ++r;
+        while (r != re && !testConstraint(*r->rule, m))
+        {
+            ++r;
+            if (m.status() != Machine::finished)
+                return;
+        }
 
 #if !defined GRAPHITE2_NTRACING
         if (fsm.dbgout)
@@ -533,6 +541,7 @@
             if (r != re)
             {
                 const int adv = doAction(r->rule->action, slot, m);
+                if (m.status() != Machine::finished) return;
                 if (r->rule->action->deletes()) fsm.slots.collectGarbage(slot);
                 adjustSlot(adv, slot, fsm.slots);
                 return;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/graphite-1.3.5/src/Segment.cpp 
new/graphite-1.3.6/src/Segment.cpp
--- old/graphite-1.3.5/src/Segment.cpp  2016-01-15 05:17:18.000000000 +0100
+++ new/graphite-1.3.6/src/Segment.cpp  2016-02-29 05:18:01.000000000 +0100
@@ -210,8 +210,13 @@
         aSlot->attachedTo()->removeChild(aSlot);
     while (aSlot->firstChild())
     {
-        aSlot->firstChild()->attachTo(NULL);
-        aSlot->removeChild(aSlot->firstChild());
+        if (aSlot->firstChild()->attachedTo() == aSlot)
+        {
+            aSlot->firstChild()->attachTo(NULL);
+            aSlot->removeChild(aSlot->firstChild());
+        }
+        else
+            aSlot->firstChild(NULL);
     }
     // reset the slot incase it is reused
     ::new (aSlot) Slot(aSlot->userAttrs());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/graphite-1.3.5/src/Slot.cpp 
new/graphite-1.3.6/src/Slot.cpp
--- old/graphite-1.3.5/src/Slot.cpp     2016-01-15 05:17:18.000000000 +0100
+++ new/graphite-1.3.6/src/Slot.cpp     2016-02-29 05:18:01.000000000 +0100
@@ -197,6 +197,8 @@
     {
         ind = gr_slatUserDefn;
         subindex = 0;
+        if (seg->numAttrs() == 0)
+            return 0;
     }
     else if (ind >= gr_slatJStretch && ind < gr_slatJStretch + 20 && ind != 
gr_slatJWidth)
     {
@@ -274,6 +276,8 @@
     {
         ind = gr_slatUserDefn;
         subindex = 0;
+        if (seg->numAttrs() == 0)
+            return;
     }
     else if (ind >= gr_slatJStretch && ind < gr_slatJStretch + 20 && ind != 
gr_slatJWidth)
     {
@@ -421,7 +425,7 @@
     else if (ap == m_child)
     {
         Slot *nSibling = m_child->nextSibling();
-        m_child->sibling(NULL);
+        m_child->removeSibling(nSibling);
         m_child = nSibling;
         return true;
     }
@@ -436,7 +440,7 @@
     else if (ap == m_sibling)
     {
         m_sibling = m_sibling->nextSibling();
-        ap->sibling(NULL);
+        if (m_sibling) ap->removeSibling(m_sibling);
         return true;
     }
     else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/graphite-1.3.5/src/TtfUtil.cpp 
new/graphite-1.3.6/src/TtfUtil.cpp
--- old/graphite-1.3.5/src/TtfUtil.cpp  2016-01-15 05:17:18.000000000 +0100
+++ new/graphite-1.3.6/src/TtfUtil.cpp  2016-02-29 05:18:01.000000000 +0100
@@ -889,8 +889,9 @@
 
/*----------------------------------------------------------------------------------------------
     Check the Microsoft Unicode subtable for expected values
 
----------------------------------------------------------------------------------------------*/
-bool CheckCmapSubtable4(const void * pCmapSubtable4, size_t table_len /*, 
unsigned int maxgid*/)
+bool CheckCmapSubtable4(const void * pCmapSubtable4, const void * pCmapEnd /*, 
unsigned int maxgid*/)
 {
+    size_t table_len = (const byte *)pCmapEnd - (const byte *)pCmapSubtable4;
     if (!pCmapSubtable4) return false;
     const Sfnt::CmapSubTable * pTable = reinterpret_cast<const 
Sfnt::CmapSubTable *>(pCmapSubtable4);
     // Bob H say some freeware TT fonts have version 1 (eg, CALIGULA.TTF) 
@@ -1049,7 +1050,7 @@
     // Just in case we have a bad key:
     while (iRange > 0 && be::peek<uint16>(pStartCode + iRange) > nUnicodePrev)
         iRange--;
-    while (be::peek<uint16>(pTable->end_code + iRange) < nUnicodePrev)
+    while (iRange < nRange - 1 && be::peek<uint16>(pTable->end_code + iRange) 
< nUnicodePrev)
         iRange++;
 
     // Now iRange is the range containing nUnicodePrev.
@@ -1074,14 +1075,15 @@
     // ends with 0xFFFF.
     if (pRangeKey)
         *pRangeKey = iRange + 1;
-    return be::peek<uint16>(pStartCode + iRange + 1);
+    return (iRange + 1 >= nRange) ? 0xFFFF : be::peek<uint16>(pStartCode + 
iRange + 1);
 }
 
 
/*----------------------------------------------------------------------------------------------
     Check the Microsoft UCS-4 subtable for expected values.
 
----------------------------------------------------------------------------------------------*/
-bool CheckCmapSubtable12(const void *pCmapSubtable12, size_t table_len /*, 
unsigned int maxgid*/)
+bool CheckCmapSubtable12(const void *pCmapSubtable12, const void *pCmapEnd /*, 
unsigned int maxgid*/)
 {
+    size_t table_len = (const byte *)pCmapEnd - (const byte *)pCmapSubtable12;
     if (!pCmapSubtable12)  return false;
     const Sfnt::CmapSubTable * pTable = reinterpret_cast<const 
Sfnt::CmapSubTable *>(pCmapSubtable12);
     if (be::swap(pTable->format) != 12)
@@ -1093,7 +1095,7 @@
     if (length < sizeof(Sfnt::CmapSubTableFormat12))
         return false;
     uint32 num_groups = be::swap(pTable12->num_groups);
-    if (length != (sizeof(Sfnt::CmapSubTableFormat12) + (num_groups - 1) * 
sizeof(uint32) * 3))
+    if (num_groups > 0x10000000 || length != 
(sizeof(Sfnt::CmapSubTableFormat12) + (num_groups - 1) * sizeof(uint32) * 3))
         return false;
 #if 0
     for (unsigned int i = 0; i < num_groups; ++i)
@@ -1166,7 +1168,7 @@
     // Just in case we have a bad key:
     while (iRange > 0 && be::swap(pTable->group[iRange].start_char_code) > 
nUnicodePrev)
         iRange--;
-    while (be::swap(pTable->group[iRange].end_char_code) < nUnicodePrev)
+    while (iRange < nRange - 1 && 
be::swap(pTable->group[iRange].end_char_code) < nUnicodePrev)
         iRange++;
 
     // Now iRange is the range containing nUnicodePrev.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/graphite-1.3.5/src/call_machine.cpp 
new/graphite-1.3.6/src/call_machine.cpp
--- old/graphite-1.3.5/src/call_machine.cpp     2016-01-15 05:17:18.000000000 
+0100
+++ new/graphite-1.3.6/src/call_machine.cpp     2016-02-29 05:18:01.000000000 
+0100
@@ -72,6 +72,7 @@
     const instr * & ip;
     uint8           direction;
     int8            flags;
+    Machine::status_t & status;
 };
 
 typedef bool        (* ip_t)(registers);
@@ -88,6 +89,7 @@
 #define mapb    reg.map_base
 #define flags   reg.flags
 #define dir     reg.direction
+#define status  reg.status
 
 #include "inc/opcodes.h"
 
@@ -113,7 +115,7 @@
     const byte    * dp = data;
     stack_t       * sp = _stack + Machine::STACK_GUARD,
             * const sb = sp;
-    regbank         reg = {*map, map, _map, _map.begin()+_map.context(), ip, 
_map.dir(), 0};
+    regbank         reg = {*map, map, _map, _map.begin()+_map.context(), ip, 
_map.dir(), 0, _status};
 
     // Run the program        
     while ((reinterpret_cast<ip_t>(*++ip))(dp, sp, sb, reg)) {}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/graphite-1.3.5/src/direct_machine.cpp 
new/graphite-1.3.6/src/direct_machine.cpp
--- old/graphite-1.3.5/src/direct_machine.cpp   2016-01-15 05:17:18.000000000 
+0100
+++ new/graphite-1.3.6/src/direct_machine.cpp   2016-02-29 05:18:01.000000000 
+0100
@@ -62,6 +62,7 @@
                         Machine::stack_t  * stack,
                         slotref         * & __map,
                         uint8                _dir,
+                        Machine::status_t & status,
                         SlotMap           * __smap=0)
 {
     // We need to define and return to opcode table from within this function 
@@ -71,17 +72,17 @@
         return opcode_table;
 
     // Declare virtual machine registers
-    const instr       * ip = program;
-    const byte        * dp = data;
-    Machine::stack_t  * sp = stack + Machine::STACK_GUARD,
-                * const sb = sp;
-    SlotMap         & smap = *__smap;
-    Segment          & seg = smap.segment;
-    slotref             is = *__map,
-                     * map = __map,
-              * const mapb = smap.begin()+smap.context();
-    uint8            dir = _dir;
-    int8             flags = 0;
+    const instr           * ip = program;
+    const byte            * dp = data;
+    Machine::stack_t      * sp = stack + Machine::STACK_GUARD,
+                    * const sb = sp;
+    SlotMap             & smap = *__smap;
+    Segment              & seg = smap.segment;
+    slotref                 is = *__map,
+                         * map = __map,
+                  * const mapb = smap.begin()+smap.context();
+    uint8                  dir = _dir;
+    int8                 flags = 0;
     
     // start the program
     goto **ip;
@@ -100,7 +101,8 @@
 const opcode_t * Machine::getOpcodeTable() throw()
 {
     slotref * dummy;
-    return static_cast<const opcode_t *>(direct_run(true, 0, 0, 0, dummy, 0));
+    Machine::status_t dumstat = Machine::finished;
+    return static_cast<const opcode_t *>(direct_run(true, 0, 0, 0, dummy, 0, 
dumstat));
 }
 
 
@@ -111,7 +113,7 @@
     assert(program != 0);
     
     const stack_t *sp = static_cast<const stack_t *>(
-                direct_run(false, program, data, _stack, is, _map.dir(), 
&_map));
+                direct_run(false, program, data, _stack, is, _map.dir(), 
_status, &_map));
     const stack_t ret = sp == _stack+STACK_GUARD+1 ? *sp-- : 0;
     check_final_stack(sp);
     return ret;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/graphite-1.3.5/src/inc/Code.h 
new/graphite-1.3.6/src/inc/Code.h
--- old/graphite-1.3.5/src/inc/Code.h   2016-01-15 05:17:18.000000000 +0100
+++ new/graphite-1.3.6/src/inc/Code.h   2016-02-29 05:18:01.000000000 +0100
@@ -114,7 +114,7 @@
 inline
 size_t  Machine::Code::estimateCodeDataOut(size_t n_bc)
 {
-    return n_bc * (sizeof(instr)+sizeof(byte));
+    return (n_bc + 1) * (sizeof(instr)+sizeof(byte));
 }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/graphite-1.3.5/src/inc/GlyphCache.h 
new/graphite-1.3.6/src/inc/GlyphCache.h
--- old/graphite-1.3.5/src/inc/GlyphCache.h     2016-01-15 05:17:18.000000000 
+0100
+++ new/graphite-1.3.6/src/inc/GlyphCache.h     2016-02-29 05:18:01.000000000 
+0100
@@ -112,6 +112,7 @@
     const SlantBox & getSubBoundingSlantBox(unsigned short glyphid, uint8 
subindex) const;
     const BBox &     getSubBoundingBBox(unsigned short glyphid, uint8 
subindex) const;
     bool             check(unsigned short glyphid) const;
+    bool             hasBoxes() const { return _boxes != 0; }
 
     CLASS_NEW_DELETE;
     
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/graphite-1.3.5/src/inc/Machine.h 
new/graphite-1.3.6/src/inc/Machine.h
--- old/graphite-1.3.5/src/inc/Machine.h        2016-01-15 05:17:18.000000000 
+0100
+++ new/graphite-1.3.6/src/inc/Machine.h        2016-02-29 05:18:01.000000000 
+0100
@@ -140,7 +140,8 @@
         stack_underflow,
         stack_not_empty,
         stack_overflow,
-        slot_offset_out_bounds
+        slot_offset_out_bounds,
+        died_early
     };
 
     Machine(SlotMap &) throw();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/graphite-1.3.5/src/inc/TtfUtil.h 
new/graphite-1.3.6/src/inc/TtfUtil.h
--- old/graphite-1.3.5/src/inc/TtfUtil.h        2016-01-15 05:17:18.000000000 
+0100
+++ new/graphite-1.3.6/src/inc/TtfUtil.h        2016-02-29 05:18:01.000000000 
+0100
@@ -137,11 +137,11 @@
     ////////////////////////////////// cmap lookup tools 
     const void * FindCmapSubtable(const void * pCmap, int nPlatformId = 3, 
         int nEncodingId = 1, size_t length = 0);
-    bool CheckCmapSubtable4(const void * pCmap31, size_t table_len /*, 
unsigned int maxgid*/);
+    bool CheckCmapSubtable4(const void * pCmap31, const void * pCmapEnd /*, 
unsigned int maxgid*/);
     gid16 CmapSubtable4Lookup(const void * pCmapSubtabel4, unsigned int 
nUnicodeId, int rangeKey = 0);
     unsigned int CmapSubtable4NextCodepoint(const void *pCmap31, unsigned int 
nUnicodeId,
         int * pRangeKey = 0);
-    bool CheckCmapSubtable12(const void *pCmap310, size_t table_len /*, 
unsigned int maxgid*/);
+    bool CheckCmapSubtable12(const void *pCmap310, const void * pCmapEnd /*, 
unsigned int maxgid*/);
     gid16 CmapSubtable12Lookup(const void * pCmap310, unsigned int uUnicodeId, 
int rangeKey = 0);
     unsigned int CmapSubtable12NextCodepoint(const void *pCmap310, unsigned 
int nUnicodeId,
         int * pRangeKey = 0);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/graphite-1.3.5/src/inc/opcodes.h 
new/graphite-1.3.6/src/inc/opcodes.h
--- old/graphite-1.3.5/src/inc/opcodes.h        2016-01-15 05:17:18.000000000 
+0100
+++ new/graphite-1.3.6/src/inc/opcodes.h        2016-02-29 05:18:01.000000000 
+0100
@@ -76,7 +76,7 @@
 #define push(n)             { *++sp = n; }
 #define pop()               (*sp--)
 #define slotat(x)           (map[(x)])
-#define DIE                 { is=seg.last(); EXIT(1); }
+#define DIE                 { is=seg.last(); status = Machine::died_early; 
EXIT(1); }
 #define POSITIONED          1
 
 STARTOP(nop)
@@ -392,7 +392,7 @@
     const          int  val  = int(pop());
     if ((slat == gr_slatPosX || slat == gr_slatPosY) && (flags & POSITIONED) 
== 0)
     {
-        seg.positionSlots(0, *smap.begin(), *(smap.end()-1), dir);
+        seg.positionSlots(0, *smap.begin(), *(smap.end()-1), seg.currdir());
         flags |= POSITIONED;
     }
     int res = is->getAttr(&seg, slat, 0);
@@ -405,7 +405,7 @@
     const          int  val  = int(pop());
     if ((slat == gr_slatPosX || slat == gr_slatPosY) && (flags & POSITIONED) 
== 0)
     {
-        seg.positionSlots(0, *smap.begin(), *(smap.end()-1), dir);
+        seg.positionSlots(0, *smap.begin(), *(smap.end()-1), seg.currdir());
         flags |= POSITIONED;
     }
     int res = is->getAttr(&seg, slat, 0);
@@ -434,7 +434,7 @@
     const int           slot_ref = int8(param[1]);
     if ((slat == gr_slatPosX || slat == gr_slatPosY) && (flags & POSITIONED) 
== 0)
     {
-        seg.positionSlots(0, *smap.begin(), *(smap.end()-1), dir);
+        seg.positionSlots(0, *smap.begin(), *(smap.end()-1), seg.currdir());
         flags |= POSITIONED;
     }
     slotref slot = slotat(slot_ref);
@@ -510,7 +510,7 @@
                         idx      = uint8(param[2]);
     if ((slat == gr_slatPosX || slat == gr_slatPosY) && (flags & POSITIONED) 
== 0)
     {
-        seg.positionSlots(0, *smap.begin(), *(smap.end()-1), dir);
+        seg.positionSlots(0, *smap.begin(), *(smap.end()-1), seg.currdir());
         flags |= POSITIONED;
     }
     slotref slot = slotat(slot_ref);


Reply via email to