Commit Graph

1385 Commits

Author SHA1 Message Date
Ebrahim Byagowi dc03a993d0
Fix collect lookups logic of FeatureTableSubstitution (#2097)
https://crbug.com/oss-fuzz/20036
2020-01-12 14:21:29 +03:30
Ebrahim Byagowi a32ecc15ae
Fix collect lookups logic of FeatureVariationRecord
As "Offset to a feature table substitution table, from beginning of the FeatureVariations table."
from https://docs.microsoft.com/en-us/typography/opentype/spec/chapter2 the record should
match its sanitize logic not the reverse way.

Fixes https://crbug.com/oss-fuzz/20021 and https://crbug.com/oss-fuzz/20022
2020-01-11 15:37:24 +03:30
Qunxin Liu 0b39c48064 [subset] closure lookups for GSUB/GPOS 2020-01-10 13:11:06 -08:00
Michiharu Ariza d2ab1ec65b fixes oss-fuzz 19978: Null-dereference READ (#2091) 2020-01-10 07:54:16 +03:30
Ebrahim Byagowi 257a197ae7
Fail serialize when map has incorrect value
fixes https://crbug.com/oss-fuzz/19956

am not super happy with the fix, guess we should do some check
before the memcpy anyway as @blueshade7 thinks also,
so let's have it or revert it when we have a better approach for the case.
2020-01-09 22:55:45 +03:30
Qunxin Liu 1db2c1d0da fix for cmap4 and OS_2 subsetting: maximum character code allowed is 0xFFFF 2020-01-09 10:00:32 -08:00
Ebrahim Byagowi 8ed46c3678
[fuzz] minor, add another already fixed case
https://crbug.com/oss-fuzz/19907
2020-01-07 23:43:53 +03:30
Ebrahim Byagowi 341407f7a5
[fuzz] minor, upload another fixed case
https://crbug.com/oss-fuzz/19878
2020-01-07 09:10:24 +03:30
Ebrahim Byagowi 7950beecfc
[subset] Fix null pointer dereference in hvar/vvar subset (#2085)
Rest of the code assumes there is at least one subtable, lets return here if not.

* https://crbug.com/oss-fuzz/19827
* https://crbug.com/oss-fuzz/19847
2020-01-06 21:25:00 +03:30
Ebrahim Byagowi 33c3d63a0a
Merge pull request #1594 from harfbuzz/var-subset
Issue 1558: [subset] TrueType/CFF2 variable font
2019-12-31 13:52:50 +03:30
Evgeniy Reizner b79ceac3c6 Prefer UINT_MAX instead of uint overflow.
Also, prefer HB_FEATURE_GLOBAL_START and HB_FEATURE_GLOBAL_END.
2019-12-15 11:46:05 -08:00
Ebrahim Byagowi 6f76c325e5
[test] Update 10.15 results
Turned out only SFNS, which wasn't available in 10.14 anyway, needed an update
See https://crbug.com/1005969#c37 also
2019-12-10 21:43:11 +03:30
Ebrahim Byagowi 2241a676ba
[test] Add macOS 10.15 related fonts
breaks the test and 10.15 bot, will add the fix in next commit, also adds a broken test for f47cbade1
2019-12-10 19:50:34 +03:30
Behdad Esfahbod b1167d19e9 Fix! 2019-12-05 15:46:58 +00:00
Behdad Esfahbod 5ff410b493 Add files, oops 2019-12-05 15:37:56 +00:00
Behdad Esfahbod 2dc20e632e Implement fallback vertical shaping from Firefox
Fixes https://github.com/harfbuzz/harfbuzz/issues/355
2019-12-05 15:28:42 +00:00
blueshade7 ed94e41065 fixed api test test-ot-glyphname 2019-11-26 18:34:06 +00:00
blueshade7 7a4745ba8d added api test test-ot-glyphname 2019-11-26 18:34:06 +00:00
blueshade7 ea8fdfa079 Merge branch 'master' into var-subset 2019-11-22 15:59:09 -08:00
Ebrahim Byagowi 64a45be519
[ubsan] Don't decrease pointer if match_glyph_data is null (#2048)
Similar to fix on https://github.com/harfbuzz/harfbuzz/pull/2022

Fixes https://crbug.com/1023070
2019-11-09 12:25:33 +03:30
Ebrahim Byagowi 84b86a12d9
[fuzz] Remove just added case
It didn't fail locally but on bots causing timeout, let remove for now.
2019-11-06 09:22:34 +03:30
Ebrahim Byagowi a8f049c9a1
[fuzz] Upload testcase of https://crbug.com/oss-fuzz/18529
Apparently false alarm per last comment and was ok locally also but lets have it here also
2019-11-05 22:26:36 +03:30
Khaled Hosny dd288840d6 [cmap] Check GID before adding ranges in format 4 & 12
Fixes https://github.com/harfbuzz/harfbuzz/issues/2031
2019-10-29 02:09:13 +02:00
Qunxin Liu defe9b6da0 crash fix : Heap-buffer-overflow READ 2
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18513
2019-10-25 13:09:47 -07:00
Qunxin Liu b2fcca6e14 fuzzer crash fix
https://oss-fuzz.com/testcase-detail/5643107869917184
2019-10-24 16:11:30 -07:00
Ebrahim Byagowi 9815ca0338 [ci] Use custom subset fuzzer timeout for failing sanitizer bots 2019-10-25 00:16:23 +03:30
Garret Rieger 95ab110cd9 Optimize intersects_array to fix fuzzer timeout. 2019-10-22 13:33:50 -07:00
Qunxin Liu b33a0d628e fuzzer crash fix: Null-dereference WRITE
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18363
2019-10-22 01:01:08 +03:30
Qunxin Liu 1f0a9d9be9 [subset] GPOS Lookup Type 2: PairPos 2019-10-21 12:35:28 -07:00
Ebrahim Byagowi e766783152 [fuzz] Add https://crbug.com/oss-fuzz/17898 testcase 2019-10-21 22:17:06 +03:30
Qunxin Liu b66094ada0 [subset] GSUB Lookup Type 6: ChainContextSubst 2019-10-18 16:52:55 -07:00
Garret Rieger 831daf4c76 Enforce HB_MAX_LANGSYS limit during layout subsetting. 2019-10-18 15:10:30 -07:00
Ebrahim Byagowi 453050ad30 Merge remote-tracking branch 'upstream/master' into var-subset 2019-10-13 08:45:29 +03:30
Ebrahim Byagowi dc45f22521 [ot-metrics] Don't use mixed scaled and not scaled for generating extents 2019-10-08 23:27:39 +03:30
Ebrahim Byagowi d73cdcf361 [ot-font] Apply font scaling before turning to int 2019-10-08 11:11:18 +03:30
Michiharu Ariza b9ff43c162 Implement gvar table and variable glyf
Split from Ariza's "[subset] TrueType/CFF2 variable font" work on #1594
2019-10-06 08:58:40 +03:30
Ebrahim Byagowi 19d45dcab7 Merge remote-tracking branch 'upstream/master' into var-subset 2019-10-03 13:39:17 +03:30
Qunxin Liu b0c3eb06b6 [subset] GPOS Lookup Type 3: CursivePos 2019-09-25 05:43:25 +09:00
Ebrahim Byagowi 0665dce116 [fuzzer] Don't process output in debug mode as it causes timeout 2019-09-21 17:36:33 +04:30
Qunxin Liu bf66d1bf58 [subset] Add integration tests for cmap14 2019-09-20 07:55:11 +09:00
Evgeniy Reizner 7d4da8b862 Remove duplicated tests from test-ot-tag (#1958) 2019-09-06 12:24:32 -04:00
Behdad Esfahbod 52d19ba459 Minor 2019-09-04 11:28:40 -04:00
Ebrahim Byagowi d3b984d379 Revert in-house pow10 (d80a3ea) and fix oss-fuzz/16922
Probably can be fixed but merging it was wrong so let's revert.
2019-09-02 18:28:03 +04:30
Ebrahim Byagowi 9ff32b79b3 Merge remote-tracking branch 'upstream/master' into glyf-rebase 2019-08-29 19:53:18 +04:30
Ebrahim Byagowi 28620310b8
[test] Avoid alloca use as clang complain
Fixes https://circleci.com/gh/harfbuzz/harfbuzz/108171 complain
2019-08-29 14:55:54 +04:30
Ebrahim Byagowi 875985cd48
[subset] Don't allow malicious fonts to insert unlimited table headers
Fixes https://crbug.com/oss-fuzz/16810
2019-08-29 14:51:22 +04:30
Ebrahim Byagowi a0b4ac4dce Turn 8 spaces to tab across the project
According to the current code style of the project
2019-08-27 02:40:41 +04:30
Ebrahim Byagowi 269a120f13
[subset] Raise the bar in new vs old table size
https://crbug.com/oss-fuzz/16740

This is actually an interesting thing that {h,v}mtx allocates as
much as a font pretends to have glyphs but the solution is not
that obvious as regular fonts can have less than actually containing
metrics in their {h,v}mtx. This change raises the bar to consider this
hmtx 4 byte for every glyph case.

Initially we wanted to just find things allocating crazy amount of
memory but having the assert has led to interesting findings also
so let's don't remove the assert and see what we can find elsewhere.
2019-08-25 20:37:00 +04:30
Ebrahim Byagowi 28aba780c4 [subset] Fix blob leak of _subset2 when returns early
Fixes https://crbug.com/oss-fuzz/16639
2019-08-24 16:11:21 +04:30
Behdad Esfahbod 163a66dc73 [test] Add test for aaa85931f3 2019-08-20 14:22:57 -07:00