Commit Graph

8760 Commits

Author SHA1 Message Date
Garret Rieger 18ab8029d5 [ENOMEM] check vector status in cmap subsetting. 2020-08-02 00:30:17 +04:30
Garret Rieger 06dbb6acbb [ENOMEM] in GSUB ChainContext subsetting check maps for allocation errors. 2020-08-01 09:21:22 +04:30
Garret Rieger fb1477795c [ENOMEM] Check result of vector resize in CBDT subsetting. 2020-08-01 09:20:52 +04:30
Ebrahim Byagowi efd716de3f [cff] Check for scalars array resize result
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24504
2020-07-31 09:27:27 +04:30
Garret Rieger 040ed094ef [ENOMEM] popragate packed/packed_map errors to the serializer.
Will disable further modifications based on a bad state.
2020-07-31 08:39:26 +04:30
Garret Rieger 7f358a55f4 [ENOMEM] unchecked resize in CFF2. 2020-07-31 02:04:06 +04:30
Garret Rieger 32f052b033 [ENOMEM] Fix several instances of not checking resize in CFF. 2020-07-31 02:04:06 +04:30
Garret Rieger 4cbc7d61bc [ENOMEM] check for unset current in serializer->length(). 2020-07-31 02:04:06 +04:30
Garret Rieger 15644ee60e [ENOMEM] fix memory leak if allocation fails during pop_pack(). 2020-07-30 04:15:35 +04:30
Garret Rieger 42237adffc [ENOMEM] make serializer modification operations no-ops if it's in an error state. 2020-07-30 03:59:49 +04:30
Ebrahim Byagowi d1f1301490
[icu] Remove support for versions older than 49
It just doesn't make sense anymore, c9e5da8ded (r41018112)
2020-07-30 02:01:43 +04:30
Ebrahim Byagowi 0b74aaece7
[icu] Remove useless HB_UNUSED tags
As c9e5da8ded (r41018040)
2020-07-30 01:47:30 +04:30
Ebrahim Byagowi c9e5da8ded [icu] Remove support of ICU versions before 42
ICU 42 is released in 2012, see also 44a3136ae6 (commitcomment-41016353)
2020-07-30 01:03:07 +04:30
Garret Rieger 4ba8e3c6fd [ENOMEM] Fix failure to check calloc return.
Fixes https://oss-fuzz.com/testcase-detail/6246465148813312.
2020-07-30 00:08:08 +04:30
Garret Rieger d307c24abf [ENOMEM] check resize() return.
Fixes https://oss-fuzz.com/testcase-detail/5641892164009984.
2020-07-30 00:08:08 +04:30
Ebrahim Byagowi 58a5961ca1 minor spacing tweak 2020-07-29 08:44:23 +04:30
Ebrahim Byagowi 07c43b8cf6 minor spacing tweak 2020-07-29 08:42:52 +04:30
Ebrahim Byagowi 5a7cc7fd8b minor spacing tweak 2020-07-29 08:33:38 +04:30
Ebrahim Byagowi 48ad745996 [ENOMEM] Fix buffer's content check logic
So now rest of shape fuzzer also can be enabled.

Fixes #2571
2020-07-29 08:09:10 +04:30
Ebrahim Byagowi c33e8006fd [fuzz] Implement failing allocator 2020-07-29 07:35:34 +04:30
Ebrahim Byagowi 44a3136ae6 [glib] Default to glib's script type handling
2.29.14 is almost released a decade ago, no need to support archaic glib versions.
2020-07-29 07:05:31 +04:30
Garret Rieger dae32b4f12 [subset] bail out of subsetting if plan allocation fails. 2020-07-29 06:37:25 +04:30
Ebrahim Byagowi a01c7a380b 2.7.0 2020-07-25 12:40:57 +04:30
Evgeniy Reizner b32f2e8b49 Remove unused code from the Khmer shaper. 2020-07-24 20:38:05 +04:30
Ebrahim Byagowi 46ec6db965 minor 2020-07-22 17:30:48 +04:30
insilications 83c44f69d3 [tests] fix PGO build testing
Adds 'mangle_path' to IGNORED_SYMBOLS
2020-07-21 03:05:28 +04:30
Ebrahim Byagowi d0e2addd43 minor 2020-07-18 22:16:02 +04:30
Ebrahim Byagowi 7e3edfa454
minor 2020-07-18 19:03:36 +04:30
Qunxin Liu 8e5bc535d1 [subset] call collect_mapping only when --gids option is used.
collect_mapping is time consuming as it iterates all codepoints in all
cmap subtables, only trigger it when necessary
2020-07-16 11:25:53 -07:00
Ebrahim Byagowi 7c433ffde2
Add HB_CUSTOM_MALLOC definition
So one can use just HB_CUSTOM_MALLOC instead need for define each of hb_*alloc_impl
2020-07-15 09:38:12 +04:30
Ebrahim Byagowi 60959b08e5
[meson] execute find_program('gen-ragel-artifacts.py') only once
should rename the script also
2020-07-14 20:28:06 +04:30
Ebrahim Byagowi 5c8e1bd237 [meson] Don't allow introspection on static library 2020-07-14 18:02:40 +04:30
Ebrahim Byagowi 9566904cb3
[morx] minor, mark with unlikely
at least just to show this is the unusual path
2020-07-14 15:17:17 +04:30
Ebrahim Byagowi 11d583a9ea
[aat] Consume glyph insertion from buffer's max_ops (#2223)
Glyph insertion is an expensive operation and we like to have it limited
based on buffer's input size which is handled by buffer's max_ops.

clusterfuzz-testcase-minimized-harfbuzz_fuzzer-5754958982021120:

Before the change: 0.67s user 0.00s system 99% cpu 0.674 total
 After the change: 0.02s user 0.00s system 98% cpu 0.024 total

Which takes much longer on valgrind and tsan bots.
2020-07-13 18:53:06 -07:00
Ebrahim Byagowi 6937092a66 [py] apply lgtm.com python suggestions 2020-07-13 23:37:52 +04:30
Ebrahim Byagowi 2a182128b9
[py] minor, comment buffer_add_utf8 call
mainly to apply lgtm suggestion, looks better also however,
some minor spacing is also applied.
2020-07-13 20:41:13 +04:30
Ebrahim Byagowi cdf18e8338
[py] minor, remove unnecessary pass
discovered by lgtm
2020-07-13 20:07:51 +04:30
Ebrahim Byagowi 45d9e8d76c
[py] minor, remove unused import 2020-07-13 19:25:53 +04:30
Behdad Esfahbod 1dfa33854f [arabic] Remove stale comment 2020-07-12 09:24:03 -07:00
Behdad Esfahbod 6a45df0a54 Fix -Wambiguous-reversed-operator warning
Fixes https://github.com/harfbuzz/harfbuzz/issues/2554
2020-07-08 18:17:40 -05:00
jfkthame 1e6027e29c
[aat] Correct array indexing when looking up actions in KerxSubTableFormat4 (#2539)
* [aat] Correct array indexing when looking up actions in KerxSubTableFormat4.

- For action_type 0 and 1, there are 2 values per action record; for action_type 2, there are 4. So we need to account for these factors when indexing into the ankrData array.

Fixes https://github.com/harfbuzz/harfbuzz/issues/2531.
2020-07-05 22:44:10 +01:00
Ebrahim Byagowi 122a2897e4 [aat] Remove lcar support
Very low use, only two distinct font files, Apple Chancery.ttf and Hoefler Text.ttc
have it so it really doesn't worth the size addition and so, but one may argue that
whole ligature caret is low use but guess we better to encourage GDEF one anyway.
2020-07-06 00:05:36 +04:30
Ebrahim Byagowi a3b9b94b63
[style] Remove fdsc support (#2541)
It isn't exposed yet and low use between Apple fonts,
32 fdsc table vs 767 OS/2 tables, even Apple doesn't
support it anymore per Ned.
2020-07-06 00:05:21 +04:30
Ebrahim Byagowi a6fb8ce98a Minor, fix -Wrange-loop-analysis warnings
Fixing these complains raised by newer versions of clang,

./hb-ot-layout-common.hh:1720:53: error: loop variable 'gid_klass_pair' is always a copy because the range of type 'hb_map_iter_t<hb_sorted_array_t<OT::HBGlyphID>, (lambda at ./hb-ot-layout-common.hh:1672:29), hb_function_sortedness_t::RETAINS_SORTING, nullptr>' does not return a reference [-Werror,-Wrange-loop-analysis]
    for (const hb_pair_t<hb_codepoint_t, unsigned>& gid_klass_pair : + it)

And

./hb-ot-color-colr-table.hh:177:44: error: loop variable '_' is always a copy because the range of type 'hb_map_iter_t<hb_filter_iter_t<hb_map_iter_t<hb_range_iter_t<unsigned int, unsigned int>, (lambda at ./hb-ot-color-colr-table.hh:209:31), hb_function_sortedness_t::RETAINS_SORTING, nullptr>, (anonymous struct at ./hb-algs.hh:331:1) &, (anonymous struct at ./hb-algs.hh:51:1) &, nullptr>, (anonymous struct at ./hb-algs.hh:338:1) &, hb_function_sortedness_t::RETAINS_SORTING, nullptr>' does not return a reference [-Werror,-Wrange-loop-analysis]
    for (const hb_item_type<BaseIterator>& _ : + base_it.iter ())
2020-07-05 11:18:04 +04:30
Jan Alexander Steffens (heftig) 4444482297 meson: Pin harfbuzz in .pc files to the built version
This ensures that we link -subset, -icu and -gobject with a matching
version of the main library.
2020-07-04 23:16:09 +04:30
Jan Alexander Steffens (heftig) 3adcf398a0 meson: Make Requires in .pc files match autotools
Libreoffice tries to use only harfbuzz-icu.pc and assumes this includes
-lharfbuzz.
2020-07-04 23:16:09 +04:30
Ebrahim Byagowi 6a2b0ba78a [py] minor, replace exit with sys.exit 2020-07-04 16:16:15 +04:30
Ebrahim Byagowi a07672d353 [py] minor, replace os.environ.get with os.getenv 2020-07-04 16:16:15 +04:30
Ebrahim Byagowi 359dbc97ae [meson] Use the recommended way to generate harfbuzz.cc
As https://github.com/harfbuzz/harfbuzz/pull/2532
2020-07-04 13:55:48 +04:30
Ebrahim Byagowi a7e82e4ffd [meson] use the recommended way to generate hb-version.h
As https://github.com/harfbuzz/harfbuzz/pull/2532
2020-07-04 13:55:48 +04:30