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
Cheng 2024-08-31 11:10:36 +09:00 committed by GitHub
parent 0b120af159
commit d6f523480b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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);