diff --git a/gfx/harfbuzz/NEWS b/gfx/harfbuzz/NEWS index e175b38a8f54..b878793af664 100644 --- a/gfx/harfbuzz/NEWS +++ b/gfx/harfbuzz/NEWS @@ -1,3 +1,19 @@ +Overview of changes leading to 1.4.5 +Friday, March 10, 2017 +==================================== + +- Revert "Fix Context lookup application when moving back after a glyph..." + This introduced memory access problems. To be fixed properly soon. + + +Overview of changes leading to 1.4.4 +Sunday, March 5, 2017 +==================================== + +- Fix Context lookup application when moving back after a glyph deletion. +- Fix buffer-overrun in Bengali. + + Overview of changes leading to 1.4.3 Saturday, February 25, 2017 ==================================== diff --git a/gfx/harfbuzz/README-mozilla b/gfx/harfbuzz/README-mozilla index 7804ce53d683..6b1a8cb7d2fb 100644 --- a/gfx/harfbuzz/README-mozilla +++ b/gfx/harfbuzz/README-mozilla @@ -1,9 +1,9 @@ -gfx/harfbuzz status as of 2017-02-25: +gfx/harfbuzz status as of 2017-03-10: This directory contains the harfbuzz source from the 'master' branch of https://github.com/behdad/harfbuzz. -Current version: 1.4.3 +Current version: 1.4.5 UPDATING: diff --git a/gfx/harfbuzz/configure.ac b/gfx/harfbuzz/configure.ac index a3eb0f021362..91fbfd70b8ac 100644 --- a/gfx/harfbuzz/configure.ac +++ b/gfx/harfbuzz/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ([2.64]) AC_INIT([HarfBuzz], - [1.4.3], + [1.4.5], [https://github.com/behdad/harfbuzz/issues/new], [harfbuzz], [http://harfbuzz.org/]) diff --git a/gfx/harfbuzz/src/harfbuzz-icu.pc b/gfx/harfbuzz/src/harfbuzz-icu.pc index 22839e900c21..9b45697e0138 100644 --- a/gfx/harfbuzz/src/harfbuzz-icu.pc +++ b/gfx/harfbuzz/src/harfbuzz-icu.pc @@ -5,7 +5,7 @@ includedir=/usr/local/include Name: harfbuzz Description: HarfBuzz text shaping library ICU integration -Version: 1.4.3 +Version: 1.4.5 Requires: harfbuzz Requires.private: icu-uc diff --git a/gfx/harfbuzz/src/harfbuzz.pc b/gfx/harfbuzz/src/harfbuzz.pc index 74a63b26a2f5..8dc8ca10dd6c 100644 --- a/gfx/harfbuzz/src/harfbuzz.pc +++ b/gfx/harfbuzz/src/harfbuzz.pc @@ -5,7 +5,7 @@ includedir=/usr/local/include Name: harfbuzz Description: HarfBuzz text shaping library -Version: 1.4.3 +Version: 1.4.5 Libs: -L${libdir} -lharfbuzz Libs.private: diff --git a/gfx/harfbuzz/src/hb-buffer-serialize.cc b/gfx/harfbuzz/src/hb-buffer-serialize.cc index 63a0f34669ae..85696c58962a 100644 --- a/gfx/harfbuzz/src/hb-buffer-serialize.cc +++ b/gfx/harfbuzz/src/hb-buffer-serialize.cc @@ -311,6 +311,8 @@ hb_buffer_serialize_glyphs (hb_buffer_t *buffer, if (!buf_consumed) buf_consumed = &sconsumed; *buf_consumed = 0; + if (buf_size) + *buf = '\0'; assert ((!buffer->len && buffer->content_type == HB_BUFFER_CONTENT_TYPE_INVALID) || buffer->content_type == HB_BUFFER_CONTENT_TYPE_GLYPHS); diff --git a/gfx/harfbuzz/src/hb-ot-layout-gsubgpos-private.hh b/gfx/harfbuzz/src/hb-ot-layout-gsubgpos-private.hh index 0c4235268614..f9fcec52b77a 100644 --- a/gfx/harfbuzz/src/hb-ot-layout-gsubgpos-private.hh +++ b/gfx/harfbuzz/src/hb-ot-layout-gsubgpos-private.hh @@ -996,7 +996,29 @@ static inline bool apply_lookup (hb_apply_context_t *c, if (!delta) continue; - /* Recursed lookup changed buffer len. Adjust. */ + /* Recursed lookup changed buffer len. Adjust. + * + * TODO: + * + * Right now, if buffer length increased by n, we assume n new glyphs + * were added right after the current position, and if buffer length + * was decreased by n, we assume n match positions after the current + * one where removed. The former (buffer length increased) case is + * fine, but the decrease case can be improved in at least two ways, + * both of which are significant: + * + * - If recursed-to lookup is MultipleSubst and buffer length + * decreased, then it's current match position that was deleted, + * NOT the one after it. + * + * - If buffer length was decreased by n, it does not necessarily + * mean that n match positions where removed, as there might + * have been marks and default-ignorables in the sequence. We + * should instead drop match positions between current-position + * and current-position + n instead. + * + * It should be possible to construct tests for both of these cases. + */ end += delta; if (end <= int (match_positions[idx])) diff --git a/gfx/harfbuzz/src/hb-ot-shape-complex-indic.cc b/gfx/harfbuzz/src/hb-ot-shape-complex-indic.cc index b48fb561c395..ec12ce69e0b3 100644 --- a/gfx/harfbuzz/src/hb-ot-shape-complex-indic.cc +++ b/gfx/harfbuzz/src/hb-ot-shape-complex-indic.cc @@ -1497,7 +1497,7 @@ final_reordering_syllable (const hb_ot_shape_plan_t *plan, if (reph_pos == REPH_POS_AFTER_SUB) { new_reph_pos = base; - while (new_reph_pos < end && + while (new_reph_pos + 1 < end && !( FLAG_SAFE (info[new_reph_pos + 1].indic_position()) & (FLAG (POS_POST_C) | FLAG (POS_AFTER_POST) | FLAG (POS_SMVD)))) new_reph_pos++; if (new_reph_pos < end) diff --git a/gfx/harfbuzz/src/hb-ot-shape.cc b/gfx/harfbuzz/src/hb-ot-shape.cc index 2eacb34c4d90..29f5e58e519a 100644 --- a/gfx/harfbuzz/src/hb-ot-shape.cc +++ b/gfx/harfbuzz/src/hb-ot-shape.cc @@ -378,7 +378,6 @@ hb_ot_shape_setup_masks_fraction (hb_ot_shape_context_t *c) post_mask = c->plan->numr_mask | c->plan->frac_mask; } - /* TODO look in pre/post context text also. */ unsigned int count = buffer->len; hb_glyph_info_t *info = buffer->info; for (unsigned int i = 0; i < count; i++) diff --git a/gfx/harfbuzz/src/hb-version.h b/gfx/harfbuzz/src/hb-version.h index f575c6997520..a1eb5e7ea30d 100644 --- a/gfx/harfbuzz/src/hb-version.h +++ b/gfx/harfbuzz/src/hb-version.h @@ -38,9 +38,9 @@ HB_BEGIN_DECLS #define HB_VERSION_MAJOR 1 #define HB_VERSION_MINOR 4 -#define HB_VERSION_MICRO 3 +#define HB_VERSION_MICRO 5 -#define HB_VERSION_STRING "1.4.3" +#define HB_VERSION_STRING "1.4.5" #define HB_VERSION_ATLEAST(major,minor,micro) \ ((major)*10000+(minor)*100+(micro) <= \