Skip to content

Replace new Buffer() with Buffer.alloc() as it is safer. #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Eraz1997
Copy link

Newer versions of NodeJS deprecated the Buffer constructor as it is unsafe (source: https://nodejs.org/en/docs/guides/buffer-constructor-deprecation/). These code changes might not work on Node.js ≤ 4.4.x and 5.0.0 — 5.9.x, but this should not be a problem since projects running those versions of NodeJS should use ref-array instead of ref-array-napi.

@Eraz1997
Copy link
Author

Eraz1997 commented Oct 14, 2021

Checks on a couple of Windows platforms failed, but it seems to be a node-gyp error when building tests, not the tests failing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant