Skip to content
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

new Buffer is deprecated and unsafe #1950

Closed
ghost opened this issue Sep 14, 2018 · 1 comment
Closed

new Buffer is deprecated and unsafe #1950

ghost opened this issue Sep 14, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 14, 2018

new Buffer is deprecated and unsafe. We should not use deprecated/unsafe Buffer constructor.

This issue can be resolved by this PR:
#1949

The behavior of new Buffer() is different depending on the type of the first argument, security and reliability issues can be inadvertently introduced into applications when argument validation or Buffer initialization is not performed.

To make the creation of Buffer instances more reliable and less error-prone, the various forms of the new Buffer() constructor have been deprecated and replaced by separate Buffer.from(), Buffer.alloc(), and Buffer.allocUnsafe() methods.

@ghost ghost changed the title new Buffer is DEPRECATED and UNSAFE new Buffer is deprecated and unsafe Sep 14, 2018
@nivida
Copy link
Contributor

nivida commented Oct 31, 2018

I've already fixed the Buffer usage in the PR #2000. 🙈

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

No branches or pull requests

1 participant