Skip to content

[cache] Correct bitmap pitch bounds check

Daniel Welty requested to merge danielwelty/freetype:master into master
  • src/cache/ftcsbits.c: When assigning to the pitch member of bitmap, use the same type, FT_Short, as defined for FTC_SBitRec_ in ftcache.h. This allows full range use of the pitch and to support caching full color glyphs like emojis that would otherwise fit in the cache.

This bug prevents caching an emoji with a width of 33 pixels because the pitch would be 132 (0x84) and too large to pass the CHECK_CHAR() for a signed 8-bit integer.

Merge request reports