mirror of https://github.com/nodejs/node.git
deps: fix sign-compare warning in ncrypto
PR-URL: https://github.com/nodejs/node/pull/54624 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>pull/54668/head
parent
0b120af159
commit
d6f523480b
|
@ -1194,7 +1194,7 @@ DataPointer DHPointer::computeSecret(const BignumPointer& peer) const {
|
|||
|
||||
// The size of the computed key can be smaller than the size of the DH key.
|
||||
// We want to make sure that the key is correctly padded.
|
||||
if (size < dp.size()) {
|
||||
if (static_cast<size_t>(size) < dp.size()) {
|
||||
const size_t padding = dp.size() - size;
|
||||
uint8_t* data = static_cast<uint8_t*>(dp.get());
|
||||
memmove(data + padding, data, size);
|
||||
|
|
Loading…
Reference in New Issue