freetype2/src/psaux
Ben Wagner 034e5dbf92 [psaux] Full bounds check for OtherSubr 19.
It is possible for OtherSubr 19 to be invoked when `decoder->buildchar` is
NULL (so that `decoder->len_buildchar` is 0), the `blend` is non-NULL with
`blend->num_designs` set to 2, and the user supplied `idx` to be large (for
example 0xFFFFFFFE).  Since these are all `FT_UInt32` the existing bounds
check overflows in a well defined manner, allowing for an invalid call to
`memcpy`.

In addition, it is possible to call OtherSubr 19 with
`decoder->len_buildchar`, `blend->num_designs`, and `idx` all zero (implying
that `blend->weight_vector` and `decoder->buildchar` are NULL).  This passes
the bounds check (it is logically always fine to copy nothing starting at
index zero) but may invoke undefined behavior in `ft_memcpy` if it is backed
by `memcpy`.  Calling `memcpy` with either the `src` or `dst` NULL is
undefined behavior (even if `count` is zero).

* src/psaux/psintrp.c (cf2_interpT2CharString): Correctly check that
`blend->num_designs` can be copied to `decoder->buildchar[idx]`.
Also avoid passing NULL to `ft_memcpy`.

Bug: https://crbug.com/1299259
2022-02-23 17:42:55 +01:00
..
afmparse.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
afmparse.h Update all copyright notices. 2022-01-11 10:54:10 +01:00
cffdecode.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
cffdecode.h Update all copyright notices. 2022-01-11 10:54:10 +01:00
module.mk Update all copyright notices. 2022-01-11 10:54:10 +01:00
psarrst.c [psaux] Use doubling allocation strategy for CF2_ArrStack. 2021-05-13 23:08:31 -04:00
psarrst.h [psaux] Use doubling allocation strategy for CF2_ArrStack. 2021-05-13 23:08:31 -04:00
psaux.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
psauxerr.h Update all copyright notices. 2022-01-11 10:54:10 +01:00
psauxmod.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
psauxmod.h Update all copyright notices. 2022-01-11 10:54:10 +01:00
psblues.c * Version 2.11.0 released. 2021-07-19 18:07:51 +02:00
psblues.h [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
psconv.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
psconv.h Update all copyright notices. 2022-01-11 10:54:10 +01:00
pserror.c [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
pserror.h [build] Fix multi and C++ builds. 2020-07-06 11:49:00 +02:00
psfixed.h Miscellaneous macro updates. 2019-05-03 23:16:42 -04:00
psfont.c Remove redundant inclusion of `ft2build.h'. 2020-06-13 21:15:45 +02:00
psfont.h Make macros for header file names optional. 2020-06-08 13:31:55 +02:00
psft.c Signedness revisions. 2021-10-07 22:41:56 -04:00
psft.h [build] Fix multi and C++ builds. 2020-07-06 11:49:00 +02:00
psglue.h [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
pshints.c [psaux] Fix assertions. 2021-06-12 08:40:16 +02:00
pshints.h [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
psintrp.c [psaux] Full bounds check for OtherSubr 19. 2022-02-23 17:42:55 +01:00
psintrp.h Fix some `cppcheck` warnings. 2021-07-24 20:32:16 +02:00
psobjs.c [psaux] Revise `PS_Table` handling. 2022-02-02 11:35:14 -05:00
psobjs.h Update all copyright notices. 2022-01-11 10:54:10 +01:00
psread.c Make macros for header file names optional. 2020-06-08 13:31:55 +02:00
psread.h [GSoC] src/*.*: Convert block comments to `light' style. 2018-06-03 09:08:41 +02:00
psstack.c Fix clang++ warnings. 2021-11-16 22:08:47 +01:00
psstack.h [build] Fix multi and C++ builds. 2020-07-06 11:49:00 +02:00
pstypes.h Remove redundant inclusion of `ft2build.h'. 2020-06-13 21:15:45 +02:00
rules.mk Update all copyright notices. 2022-01-11 10:54:10 +01:00
t1cmap.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
t1cmap.h Update all copyright notices. 2022-01-11 10:54:10 +01:00
t1decode.c Update all copyright notices. 2022-01-11 10:54:10 +01:00
t1decode.h Update all copyright notices. 2022-01-11 10:54:10 +01:00