ardovm commented on pull request #106: URL: https://github.com/apache/openoffice/pull/106#issuecomment-710050455
@androidports > I think 4.1.8-RC2 avoid crashing by invalid CFF format, but this invalid format is caused by casting from `float` to `int` in main/vcl/source/fontsubset/cff.cxx:637. > > `nInt = static_cast<int>(nVal);` Very good catch, Yoshikawa-san! A `float` cannot represent all values of a 32-bit `int`! I wonder why no one ever found this bug before? > This patch change casting from float to double. I confirm this fixes the garbled PDF output. IMHO this PR addresses a totally different problem than PR #89 and is worth merging on its own. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
