FreeType is an endless shitshow of security vulnerabilities going back 25 years now. There's really no excuse in 2020 for writing libraries to decode file formats in unsafe languages. Yes, there are performance-sensitive aspects to image decoding, but opening the file and reading two integers is not one of those.