Garret Rieger
9a3537e5f6
[subset] invert err() return value. Undo previous change to check_success.
2021-03-29 17:15:22 -06:00
Garret Rieger
cdba5d44c2
[subset] fix incorrect handling of return value in check_success in the error case.
2021-03-29 17:15:22 -06:00
Garret Rieger
46bf03d691
[subset] add NODISCARD to error checking methods on serializer.
2021-03-18 14:35:36 -07:00
Garret Rieger
3827a3eb56
[subset] rename serializer::set_error() to err().
2021-03-18 11:20:03 -07:00
Garret Rieger
b14475d2ae
[subset] further changes to serializer error handling.
...
- Rename enum type and enum members.
- in_errors() now returns true for any error having been set. hb-subset now looks for offset overflow only errors to divert to repacker.
- Added INT_OVERFLOW and ARRAY_OVERFLOW enum values.
2021-03-18 10:51:26 -07:00
Garret Rieger
73ed59f7a6
[subset] store errors in the serializer as a flag set.
...
Make check_assign/check_equal specify the type of error to set.
2021-03-17 15:58:34 -07:00
Garret Rieger
b9ecc7420d
[subset] init offset_overflow in hb_serialize_context_t.
2021-03-17 15:53:58 -07:00
Garret Rieger
832f2b599b
[subset] Refactor _subset () to reduce nesting and eliminate the use of 'goto'.
2021-03-17 15:53:58 -07:00
Garret Rieger
6b1ea4cbe7
[subset] hook up the repacker to run if offset overflows are encountered during subsetting.
2021-03-17 15:53:57 -07:00
Garret Rieger
1584d3cb8f
[subset] Start a proof of concept implementation of the GSUB/GPOS offset overflow resolver.
2021-03-17 15:53:57 -07:00
Behdad Esfahbod
e5b7bc424d
m Add default value to BEInt<> Size template parameter
2021-02-20 15:14:15 -07:00
Behdad Esfahbod
dfa9d7acdc
[minor] Use serializer->propagate_error() to simplify code
2021-02-11 11:19:51 -07:00
Garret Rieger
6f754852c1
[ENOMEM] skip asserts in to_bias if serializer is in an error state.
2020-08-12 11:25:30 +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
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
Behdad Esfahbod
2cc85281c2
[serializer] Make snapshot()/revert() revert current object links
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2325
2020-04-18 17:31:32 -07:00
ariza
65f4136303
minor; fixes #2292
2020-04-01 19:49:18 -07:00
ariza
188a0a47c2
removed default base; replaced w/ bias if required
2020-03-08 22:59:43 +03:30
blueshade7
4c3af7d406
add "add_link()" with bias arg
...
issue #2227
2020-03-08 18:48:56 +03:30
ariza
6120f50c8f
fix Head with link.bias
2020-02-21 10:17:26 -08:00
ariza
e65bff0943
workaround whence_t as bit-field
2020-02-21 10:17:26 -08:00
ariza
1aed6d223c
fix whence=Head; position as 28 bits
2020-02-21 10:17:25 -08:00
ariza
4ca8e0d989
re-implement Tail; rewrote name table with it
2020-02-21 10:17:25 -08:00
ariza
c1313e4be2
minor: undid unintended change
2020-02-21 10:17:25 -08:00
ariza
9c65680b48
rename enums to avoid conflict on win
2020-02-21 10:17:25 -08:00
ariza
555f6f1daa
merge add_link_abs() into add_link()
2020-02-21 10:17:25 -08:00
ariza
017cd945bf
added add_link_abs()
2020-02-21 10:17:25 -08:00
ariza
6585846352
pop_pack(share=false) in end_serialize()
...
issue #2177
2020-02-16 17:16:29 -08:00
Michiharu Ariza
39fb57c0e4
add share option to pop_pack() ( #2176 )
...
as a solution for #2164
2020-02-16 08:38:41 -08:00
Behdad Esfahbod
d663e28af1
[serialize] Catch signedness overflows in check_assign()
...
Should address https://github.com/harfbuzz/harfbuzz/pull/2163#pullrequestreview-355137936
2020-02-12 15:41:21 +00:00
Ebrahim Byagowi
486754a888
[serialize] Extract iterable copy, copy_all
2019-10-31 13:31:11 -07:00
Ebrahim Byagowi
22b6c6a5c7
[serialize] use for each as #resolve_links, format
2019-09-24 12:06:28 +03:30
Qunxin Liu
512551f276
memory leak fix in serializer ( #1988 )
2019-09-23 17:28:16 -07:00
Behdad Esfahbod
1c56b5d1d8
[serialize] Fix copy() calling operator=
...
9f610ae239 (commitcomment-33944686)
2019-06-17 14:23:04 -07:00
Behdad Esfahbod
e8b45c1933
[array] Add .copy()
2019-05-08 16:37:38 -07:00
Behdad Esfahbod
83e3eabd84
Whitespace
2019-05-07 20:58:43 -07:00
Behdad Esfahbod
5c0f62adc9
[serializer] Accept pointer & reference in more methods
2019-05-07 17:25:58 -07:00
Behdad Esfahbod
839618de3b
[serializer] Minor
2019-05-07 17:21:27 -07:00
Behdad Esfahbod
fa8c4ba811
Minor
2019-05-07 14:26:03 -07:00
Behdad Esfahbod
52f6c04c1e
Minor
2019-05-07 13:45:48 -07:00
Behdad Esfahbod
2eb7e0e0e9
[serialize] Minor
2019-05-07 12:45:38 -07:00
Behdad Esfahbod
1c81cff2d3
Fix signed-comparison error on 32bit
2019-05-07 11:51:10 -07:00
Behdad Esfahbod
e6a622b5b2
[serialize] Enable bias assertion
2019-05-07 11:06:43 -07:00
Behdad Esfahbod
530ddbbc32
[serialize] Use range-based loop
2019-05-07 11:05:51 -07:00
Behdad Esfahbod
240f57e58d
Rename hb_deref_pointer() to hb_deref()
2019-05-06 23:17:39 -07:00
Behdad Esfahbod
431b6e1c44
[serialize] Disable assertion for now
2019-05-02 16:22:32 -07:00
Behdad Esfahbod
8a32c9eecb
[serialize] Misc getting copy() to work
2019-05-02 16:20:18 -07:00
Behdad Esfahbod
91176d5b77
[serialize] Check offset base is within (possibly end of) object
2019-05-02 15:12:07 -07:00