Skip to content

stream_wrap: cast input to Buffer

Rodrigo Muino Tomonari requested to merge github/fork/indutny/fix/gh-3970 into master

When wrapping stream - cast its input data to Buffer before using. Someone may have called .setEncoding() on it, and we should not crash if the input is a string.

Fix: https://github.com/nodejs/node/issues/3970

Merge request reports

Loading