Skip to content

[truetype] Allow packed deltas to use fewer bytes than number of points

Jany Belluz requested to merge belluzj/freetype:fix-cvar-bugs into master
  • src/truetype/ttgxvar (ft_var_readpackeddeltas): Function was expecting that the amount of bytes used to encode the deltas would be higher than the number of encoded values, but actually the spec allows very concise encoding, e.g. a list of 200 zeros could be encoded only with a couple bytes. Instead of the first check I'm now counting bytes as we consume the input, to make sure not to read more than expected.

Merge request reports