mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 14:31:10 +01:00
29b596ac67806c44441e65f3ece227df0fe2bb63
Email from Jonathan Kew:
My cygwin build kept aborting on certain test words when run with the
uniscribe backend. Turned out this was caused by a bug in the allocation
of scratch buffers in hb-uniscribe.cc.
Commit 2a17f9568d introduced a new line
ALLOCATE_ARRAY (SCRIPT_VISATTR, vis_attr, glyphs_size);
but it failed to account for this in the computation of glyphs_size
(the number of glyphs for which scratch buffer space is available),
with the result that the vis_clusters array ends up overrunning the
end of the scratch buffer and clobbering the beginning of the buffer's
info[].
AFAICS, the vis_attr array is not actually used, so the simple fix is
to remove the line that allocates it. (If/when we -do- need to use
vis_attr for something, we'll need to add another term to the earlier
calculation of glyphs_size.)
With this patch, the uniscribe backend runs reliably again.
JK
This is HarfBuzz, a text shaping library. For bug reports, mailing list, and other information please visit: http://harfbuzz.org/ For license information, see the file COPYING.
Languages
C++
73.3%
C
16.2%
Python
3.2%
Hack
2.3%
Meson
1.1%
Other
3.8%