Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
precompiles: Improve output buffer handling (#951)
Replace the fixed-size on-stack temporary buffer for precompiles with a heap-allocated buffer big enough to handle properly any precompile invocation. This actually keeps the number of allocations the same. Previously the contents of the on-stack buffer were copied to heap by the Result constructor. Now we are creating the heap buffer in the first place and pass the ownership of it to the Result. This fixes out-of-bounds memory accesses often being found by fuzzers.
- Loading branch information