src,crypto: refactor crypto_dh.cc#42492
Conversation
Refs: nodejs#39941 Signed-off-by: Darshan Sen <raisinten@gmail.com>
ZeroPadDiffieHellmanSecret() is in an anonymous namespace, so it has static linkage already. Signed-off-by: Darshan Sen <raisinten@gmail.com>
Buffer::Length() dereferences the passed Local, so calling it when the underlying pointer is a nullptr would lead to a crash. This fixes that by returning early instead. Signed-off-by: Darshan Sen <raisinten@gmail.com>
|
Review requested:
|
This comment was marked as outdated.
This comment was marked as outdated.
Commit Queue failed- Loading data for nodejs/node/pull/42492 ✔ Done loading data for nodejs/node/pull/42492 ----------------------------------- PR info ------------------------------------ Title src,crypto: refactor `crypto_dh.cc` (#42492) Author Darshan Sen (@RaisinTen) Branch RaisinTen:src,crypto/refactor-crypto_dh -> nodejs:master Labels crypto, c++, author ready, needs-ci Commits 3 - src,crypto: remove uses of AllocatedBuffer from crypto_dh.cc - src: remove unnecessary static qualifier in crypto_dh.cc - src,crypto: handle empty maybe correctly in crypto_dh.cc Committers 1 - Darshan Sen PR-URL: https://github.com/nodejs/node/pull/42492 Refs: https://github.com/nodejs/node/pull/39941 Reviewed-By: Tobias Nießen Reviewed-By: Anna Henningsen ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/42492 Refs: https://github.com/nodejs/node/pull/39941 Reviewed-By: Tobias Nießen Reviewed-By: Anna Henningsen -------------------------------------------------------------------------------- ℹ This PR was created on Sun, 27 Mar 2022 13:25:58 GMT ✔ Approvals: 2 ✔ - Tobias Nießen (@tniessen) (TSC): https://github.com/nodejs/node/pull/42492#pullrequestreview-922458162 ✔ - Anna Henningsen (@addaleax): https://github.com/nodejs/node/pull/42492#pullrequestreview-925243682 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2022-03-27T21:15:26Z: https://ci.nodejs.org/job/node-test-pull-request/43203/ - Querying data for job/node-test-pull-request/43203/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ No git cherry-pick in progress ✔ No git am in progress ✔ No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/master up to date... From https://github.com/nodejs/node * branch master -> FETCH_HEAD ✔ origin/master is now up-to-date - Downloading patch for 42492 From https://github.com/nodejs/node * branch refs/pull/42492/merge -> FETCH_HEAD ✔ Fetched commits as 85f679fff101..c1ac41dce2ec -------------------------------------------------------------------------------- [master 4e0135cabd] src,crypto: remove uses of AllocatedBuffer from crypto_dh.cc Author: Darshan Sen Date: Sun Mar 27 18:02:52 2022 +0530 1 file changed, 52 insertions(+), 24 deletions(-) [master e572e53817] src: remove unnecessary static qualifier in crypto_dh.cc Author: Darshan Sen Date: Sun Mar 27 18:06:08 2022 +0530 1 file changed, 3 insertions(+), 3 deletions(-) [master 68d23c2f72] src,crypto: handle empty maybe correctly in crypto_dh.cc Author: Darshan Sen Date: Sun Mar 27 18:20:20 2022 +0530 1 file changed, 4 insertions(+), 3 deletions(-) ✔ Patches applied There are 3 commits in the PR. Attempting autorebase. Rebasing (2/6)https://github.com/nodejs/node/actions/runs/2066012062 |
|
Landed in 85f679f...f2a22ef |
Buffer::Length() dereferences the passed Local, so calling it when the underlying pointer is a nullptr would lead to a crash. This fixes that by returning early instead. Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: #42492 Refs: #39941 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Refs: nodejs#39941 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: nodejs#42492 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
ZeroPadDiffieHellmanSecret() is in an anonymous namespace, so it has static linkage already. Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: nodejs#42492 Refs: nodejs#39941 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Buffer::Length() dereferences the passed Local, so calling it when the underlying pointer is a nullptr would lead to a crash. This fixes that by returning early instead. Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: nodejs#42492 Refs: nodejs#39941 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Buffer::Length() dereferences the passed Local, so calling it when the underlying pointer is a nullptr would lead to a crash. This fixes that by returning early instead. Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: #42492 Refs: #39941 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Refs: nodejs#39941 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: nodejs#42492 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
ZeroPadDiffieHellmanSecret() is in an anonymous namespace, so it has static linkage already. Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: nodejs#42492 Refs: nodejs#39941 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Buffer::Length() dereferences the passed Local, so calling it when the underlying pointer is a nullptr would lead to a crash. This fixes that by returning early instead. Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: nodejs#42492 Refs: nodejs#39941 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Buffer::Length() dereferences the passed Local, so calling it when the underlying pointer is a nullptr would lead to a crash. This fixes that by returning early instead. Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: #42492 Refs: #39941 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Buffer::Length() dereferences the passed Local, so calling it when the underlying pointer is a nullptr would lead to a crash. This fixes that by returning early instead. Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: #42492 Refs: #39941 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Buffer::Length() dereferences the passed Local, so calling it when the underlying pointer is a nullptr would lead to a crash. This fixes that by returning early instead. Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: #42492 Refs: #39941 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Buffer::Length() dereferences the passed Local, so calling it when the underlying pointer is a nullptr would lead to a crash. This fixes that by returning early instead. Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: #42492 Refs: #39941 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Buffer::Length() dereferences the passed Local, so calling it when the underlying pointer is a nullptr would lead to a crash. This fixes that by returning early instead. Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: #42492 Refs: #39941 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Refs: nodejs/node#39941 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: nodejs/node#42492 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
ZeroPadDiffieHellmanSecret() is in an anonymous namespace, so it has static linkage already. Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: nodejs/node#42492 Refs: nodejs/node#39941 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Buffer::Length() dereferences the passed Local, so calling it when the underlying pointer is a nullptr would lead to a crash. This fixes that by returning early instead. Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: nodejs/node#42492 Refs: nodejs/node#39941 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
src,crypto: remove uses of
AllocatedBufferfromcrypto_dh.ccRefs: #39941
src: remove unnecessary
staticqualifier incrypto_dh.ccZeroPadDiffieHellmanSecret()is in an anonymous namespace, so it hasstatic linkage already.
src,crypto: handle empty maybe correctly in
crypto_dh.ccBuffer::Length()dereferences the passedLocal, so calling it when theunderlying pointer is a
nullptrwould lead to a crash. This fixes thatby returning early instead.
Signed-off-by: Darshan Sen raisinten@gmail.com