Behdad Esfahbod
4c14043b06
[algs] Add output argument to hb_unsigned_mul_overflows()
2022-11-21 12:56:33 -07:00
Garret Rieger
64b29dbd59
[subset] reuse colrv1 max nesting depth constant for sanitize.
2021-11-10 10:34:46 -07:00
Garret Rieger
ace98cc65f
[subset] Only sanitize recursion depth in COLR.
2021-11-10 10:34:46 -07:00
Garret Rieger
782a7377ad
[sanitize] add a maximum recursion depth for sanitize.
2021-11-10 10:34:46 -07:00
Behdad Esfahbod
6d555ce82e
[meta] Use std::forward instead of hb_forward()
2021-11-02 00:18:22 -06:00
Garret Rieger
8ef4257dc8
[sanitize] change max ops to track number of bytes processed.
...
Counting bytes as the operations is likely to be a better proxy for how
much work processing the table will cost vs. the current approach of
counting the number of sub-objects.
This should allow checks for max features, max scripts, etc. to be removed.
I tested this change against the full collection of fonts at https://github.com/google/fonts
and a max ops factor of 3 was sufficient to successfully sanitize all of them.
2021-03-31 19:03:30 -06:00
Behdad Esfahbod
a650243d39
[sanitize] Fix typo
2021-01-24 13:30:06 -07:00
Khaled Hosny
a8e72ee784
[docs] Use %true and %false consistently
2020-12-30 23:28:26 +02:00
Behdad Esfahbod
1535440b48
[dispatch] Fix debug builds
2020-06-19 08:32:57 -07:00
Ebrahim Byagowi
b398748d8b
[algs] Add hb_clamp
...
Similar to stl and glsl's clamp
2020-03-04 11:18:19 +03:30
Ebrahim Byagowi
d383603976
Limit OT::Lookup subtables ( #2219 )
...
Fixes https://crbug.com/oss-fuzz/13943
2020-03-02 22:41:08 +03:30
Marcel Fabian Krüger
b28c282585
Check to avoid overflows
2019-12-16 18:08:22 -08:00
Marcel Fabian Krüger
d70afb1e5a
Clamp max_ops to upper bound in hb-sanitize.hh
2019-12-16 18:08:22 -08:00
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
Behdad Esfahbod
25a5b287f2
Fix sanitize fail of extension sublookups
...
Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=960331
2019-05-10 16:03:20 -07:00
Behdad Esfahbod
2ba984fcbb
Fix signed comparison on 32bit
2019-05-07 23:28:22 -07:00
Behdad Esfahbod
83e3eabd84
Whitespace
2019-05-07 20:58:43 -07:00
Behdad Esfahbod
41248cce0e
Remove MIN/MAX in favor of hb_min/hb_max
2019-05-07 20:54:31 -07:00
Behdad Esfahbod
c14efb8e68
Fix previous commit
...
Priority should be given to specific over dispatch. Broke sanitize before.
This fixes it, by moving prioritization to the context implementation, since
the correct priority cannot be done in the dispatch implementation. Done
for subset and sanitize only, which need it.
2019-05-05 09:54:58 -07:00
Behdad Esfahbod
b10f65933a
[dispatch] Use functionality from previous commit
...
To remove a couple of unwanted wrapper methods
2019-05-05 09:23:35 -07:00
Behdad Esfahbod
ac350c92fd
[dispatch] Try obj.dispatch(c) before trying c->dispatch(obj)
2019-05-05 09:10:46 -07:00
Behdad Esfahbod
a7c63cd8f8
Split sanitize and dispatch into their own files
2019-03-30 14:59:40 -07:00