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>
This commit is contained in:
Cheng authored and Antoine du Hamel committed 2024-09-12 11:06:37 +02:00
1 parent fdb65111a3
commit 6a32645dbc
1 file changed
+1 -1
+1 -1
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);