Skip to content

Backport important Buffer changes to v5.x

Rodrigo Muino Tomonari requested to merge github/fork/ChALkeR/buffer-5.x into v5.x

This backports three two Buffer-related commits to 5.x

  1. allocUnsafeSlow introduction from #5833.

    Buffer.alloc and Buffer.allocUnsafe are already backported to 5.x, while Buffer.allosUnsafeSlow isn't — that could be unexpected by users. The good thing is that allocUnsafeSlow (as SlowBuffer) is hopefully rarely used.

    This is a backport and was significantly changed from the original commit — it does not modify any existing code or tests, it just adds the new API method and tests for it. No deprecation is introduced in the docs.

  2. ignore negative allocation lengths from #7051 — security-related.

    Merged in #7221.

  3. add buffer testcase for resetting kZeroFill from #7093 — testcase for safeguard against accidental kNoZeroFill.

    This landed cleanly.

/cc @jasnell @trevnorris @bnoordhuis @addaleax

Merge request reports

Loading