Skip to content

Revert "[bzip2] Avoid use of uninitialized memory."

Ben Wagner requested to merge bungeman/freetype:revert_to_bzip2_qnew into master

This reverts commit d276bcb7.

The original commit did avoid the use of uninitialized memory. However, it appears that the original commit is no longer required. The underlying issue was resolved by a change in freetype2-testing "Build bzip2 correctly." [0]. Prior to [0] bzip2 was built without msan, so bzip2 writes were not tracked or considered initialized. Clearing buffer in the original commit allowed msan to see the buffer content initialized once in FreeType code, but msan saw no writes into buffer from bzip2. With bzip2 now built with msan, the bzip2 writes are properly instrumented and msan sees the bzip2 writes into the buffer. As a result the original commit can be safely reverted to allow for better detection of other uninitialized data scenarios.

  • src/bzip2/ftbzip2.c (FT_Stream_OpenBzip2): Revert to using FT_QNEW.

[0] https://github.com/freetype/freetype2-testing/commit/3c052a837a3c960709227a0d6ddd256e87b88853

Merge request reports