summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-03-11 21:30:40 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-03-11 21:30:40 +0000
commit794123fb1f8929b208622244163dd2df7cdcdb82 (patch)
tree84d3bf8a18df3df7bba8f7802516d92c526415ef /Build/source/libs/harfbuzz/harfbuzz-src/src
parent651d65f738e933785b502a82b08cbc76a631b993 (diff)
harfbuzz 1.4.5
git-svn-id: svn://tug.org/texlive/trunk@43457 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc2
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh7
2 files changed, 6 insertions, 3 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc
index 63a0f34669a..85696c58962 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-buffer-serialize.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/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/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh
index 005ed21d804..f9fcec52b77 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-layout-gsubgpos-private.hh
@@ -1021,13 +1021,14 @@ static inline bool apply_lookup (hb_apply_context_t *c,
*/
end += delta;
- if (end < int (match_positions[idx]))
+ if (end <= int (match_positions[idx]))
{
/* End might end up being smaller than match_positions[idx] if the recursed
- * lookup ended up removing too many items.
+ * lookup ended up removing many items, more than we have had matched.
* Just never rewind end back and get out of here.
* https://bugs.chromium.org/p/chromium/issues/detail?id=659496 */
end = match_positions[idx];
+ /* There can't be any further changes. */
break;
}
@@ -1040,7 +1041,7 @@ static inline bool apply_lookup (hb_apply_context_t *c,
}
else
{
- /* NOTE: delta is non-positive. */
+ /* NOTE: delta is negative. */
delta = MAX (delta, (int) next - (int) count);
next -= delta;
}